Skip to content

Commit

Permalink
bootstrap
Browse files Browse the repository at this point in the history
  • Loading branch information
LeNitrous committed Feb 28, 2023
0 parents commit 72d787d
Show file tree
Hide file tree
Showing 17 changed files with 1,045 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .codespaces.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM mcr.microsoft.com/vscode/devcontainers/base:debian

USER vscode

# Install Xvfb
RUN sudo apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& sudo apt-get -y install --no-install-recommends \
xvfb xauth \
&& sudo apt-get autoremove -y \
&& sudo apt-get clean -y \
&& sudo rm -rf /var/lib/apt/lists/*

# Install .NET SDK
# Source: https://docs.microsoft.com/dotnet/core/install/linux-scripted-manual#scripted-install
RUN mkdir -p /home/vscode/dotnet && \
curl -fsSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --install-dir /home/vscode/dotnet -c STS && \
curl -fsSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --install-dir /home/vscode/dotnet -c LTS

ENV DOTNET_ROOT=/home/vscode/dotnet
ENV PATH=$PATH:/home/vscode/dotnet
13 changes: 13 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "ReactOS",
"context": "..",
"dockerFile": "../.codespaces.dockerfile",
"customizations": {
"vscode": {
"extensions": [
"ms-dotnettools.csharp",
"editorconfig.editorconfig"
]
}
}
}
271 changes: 271 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,271 @@
root = true

[*]
charset = utf-8
indent_style = space
trim_trailing_whitespace = true

[*.{json,csproj,targets,props}]
indent_size = 2

[*.cs]
indent_size = 4
insert_final_newline = true

# Namespace
dotnet_diagnostic.IDE0130.severity = error

# File Header
file_header_template = Copyright (c) Cosyne and The Vignette Authors\nLicensed under MIT. See LICENSE for details.
dotnet_diagnostic.IDE0073.severity = error

# 'this' qualifiers
dotnet_style_qualfication_for_field = false:warning
dotnet_style_qualfication_for_property = false:warning
dotnet_style_qualfication_for_method = false:warning
dotnet_style_qualfication_for_event = false:warning

# Keyword preferences
dotnet_style_predefined_type_for_locals_parameters_members = true:error
dotnet_style_predefined_type_for_member_access = true:error

# Modifier Preferences
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:warning
dotnet_style_require_accessibility_modifiers = for_non_interface_members:error
dotnet_style_readonly_field = true:warning

# Parenthesis preferenes
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:suggestion
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:suggestion
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:suggestion
dotnet_style_parentheses_in_other_operators = always_for_clarity:suggestion

# Expression-level preferences
dotnet_style_object_initializer = true:suggestion
dotnet_style_collection_initializer = true:suggestion
dotnet_style_prefer_auto_properties = true:warning
dotnet_style_explicit_tuple_names = true:warning
dotnet_style_prefer_inferred_tuple_names = true:warning
dotnet_style_prefer_inferred_anonymous_type_member_names = true:warning
dotnet_style_prefer_conditional_expression_over_assignment = false:silent
dotnet_style_prefer_conditional_expression_over_return = false:silent
dotnet_style_prefer_compound_assignment = true:warning
dotnet_style_prefer_simplified_interpolation = true:warning
dotnet_style_prefer_simplified_boolean_expressions = true:warning
dotnet_diagnostic.IDE0010.severity = silent
dotnet_diagnostic.IDE0082.severity = warning
dotnet_diagnostic.IDE0050.severity = warning
dotnet_duagnostic.IDE0070.severity = error

# Null checking preferences
dotnet_style_coalesce_expression = true:warning
dotnet_style_null_propagation = true:warning
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:error

# 'var' preferences
csharp_style_var_for_built_in_types = false:error
csharp_style_var_when_type_is_apparent = true:suggestion
csharp_style_var_elsewhere = true:suggestion

# Expression-bodied members
csharp_style_expression_bodied_constructors = false:warning
csharp_style_expression_bodied_methods = false:silent
csharp_style_expression_bodied_operators = false:silent
csharp_style_expression_bodied_properties = when_on_single_line:warning
csharp_style_expression_bodied_indexers = when_on_single_line:warning
csharp_style_expression_bodied_accessors = when_on_single_line:warning
csharp_style_expression_bodied_local_functions = when_on_single_line:warning

# Pattern matching preferences
csharp_style_pattern_matching_over_as_with_null_check = true:warning
csharp_style_pattern_matching_over_is_with_cast_check = true:warning
csharp_style_prefer_switch_expression = false:silent
csharp_style_prefer_pattern_matching = true:warning
csharp_style_prefer_not_pattern = true:warning

# Expression-level preferences
csharp_style_inlined_variable_declaration = true:warning
csharp_prefer_simple_default_expression = true:warning
csharp_style_pattern_local_over_anonymous_function = true:warning
csharp_style_deconstructed_variable_declaration = true:warning
csharp_style_prefer_index_operator = true:warning
csharp_style_prefer_range_operator = true:warning
csharp_style_implicit_object_creation_when_type_is_apparent = true:warning
dotnet_diagnostic.IDE0072.severity = none

# 'null' checking preferences
csharp_style_throw_expression = true:warning
csharp_style_conditional_delegate_call = true:warning

# Code block preferences
csharp_prefer_braces = when_multiline:suggestion
csharp_prefer_simple_using_statement = true:none

# 'using' directive preferences
csharp_using_directive_placement = outside_namespace:error

csharp_prefer_static_local_function = true:error
dotnet_diagnostic.IDE0064.severity = none

# Unnecessary code rules
dotnet_diagnostic.IDE0001.severity = warning
dotnet_diagnostic.IDE0002.severity = warning
dotnet_diagnostic.IDE0004.severity = warning
dotnet_diagnostic.IDE0005.severity = warning
dotnet_diagnostic.IDE0035.severity = error
dotnet_diagnostic.IDE0051.severity = warning
dotnet_diagnostic.IDE0052.severity = warning
csharp_style_unused_value_expression_statement_preference = discard_variable:none
csharp_style_unused_value_assignment_preference = discard_variable:none
dotnet_code_quality_unused_parameters = all:suggestion
dotnet_remove_unnecessary_suppression_exclusions = none:suggestion
dotnet_diagnostic.IDE0080.severity = warning
dotnet_diagnostic.IDE0100.severity = warning
dotnet_diagnostic.IDE0110.severity = warning

# Organize Using Directives
dotnet_sort_system_directives_first = true:warning
dotnet_separate_import_directive_groups = false:warning

# Namespace options
dotnet_style_namespace_match_folder = true:error
csharp_style_namespace_declarations = file_scoped:error

# New line options
csharp_new_line_before_open_brace = all
csharp_new_line_before_else = true:warning
csharp_new_line_before_catch = true:warning
csharp_new_line_before_finally = true:warning
csharp_new_line_before_members_in_object_initializers = true:warning
csharp_new_line_before_members_in_anonymous_types = true:warning
csharp_new_line_between_query_expression_clauses = true:warning

# Indentation options
csharp_indent_case_contents = true:warning
csharp_indent_switch_labels = true:warning
csharp_indent_labels = flush_left:warning
csharp_indent_block_contents = true:warning
csharp_indent_braces = false:warning
csharp_indent_case_contents_when_block = false:warning

# Spacing options
csharp_space_after_cast = false:warning
csharp_space_after_keywords_in_control_flow_statements = true:warning
csharp_space_before_colon_in_inheritance_clause = true:warning
csharp_space_after_colon_in_inheritance_clause = true:warning
csharp_space_around_binary_operators = before_and_after:warning
csharp_space_between_method_declaration_parameter_list_parentheses = false:warning
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false:warning
csharp_space_between_method_declaration_name_and_open_parenthesis = false:warning
csharp_space_between_method_call_parameter_list_parentheses = false:warning
csharp_space_between_method_call_empty_parameter_list_parentheses = false:warning
csharp_space_between_method_call_name_and_opening_parenthesis = false:warning
csharp_space_after_comma = true:warning
csharp_space_before_comma = false:warning
csharp_space_after_dot = false:warning
csharp_space_before_dot = false:warning
csharp_space_after_semicolon_in_for_statement = true:warning
csharp_space_around_declaration_statements = false:warning
csharp_space_before_open_square_brackets = false:warning
csharp_space_between_empty_square_brackets = false:warning
csharp_space_between_square_brackets = false:warning

# Wrap options
csharp_preserve_single_line_statements = false:warning
csharp_preserve_single_line_blocks = true:warning

# Banned APIs
dotnet_diagnostic.RS0030.severity = error

# Public Members
dotnet_naming_rule.public_members.severity = warning
dotnet_naming_rule.public_members.style = public_members_style
dotnet_naming_rule.public_members.symbols = public_members_symbols
dotnet_naming_style.public_members_style.capitalization = pascal_case
dotnet_naming_symbols.public_members_symbols.applicable_kinds = property,field,event,method
dotnet_naming_symbols.public_members_symbols.applicable_accessibilities = public,internal,protected,protected_internal,private_protected

# Public Static Members
dotnet_naming_rule.public_static_members.severity = warning
dotnet_naming_rule.public_static_members.style = public_static_members_style
dotnet_naming_rule.public_static_members.symbols = public_static_members_symbols
dotnet_naming_style.public_static_members_style.capitalization = pascal_case
dotnet_naming_symbols.public_static_members_symbols.applicable_kinds = property,field,event,method
dotnet_naming_symbols.public_static_members_symbols.applicable_accessibilities = public,internal,protected,protected_internal,private_protected
dotnet_naming_symbols.public_static_members_symbols.required_modifiers = static

# Public Constant Members
dotnet_naming_rule.public_const_members.severity = warning
dotnet_naming_rule.public_const_members.style = public_const_members_style
dotnet_naming_rule.public_const_members.symbols = public_const_members_symbols
dotnet_naming_style.public_const_members_style.capitalization = all_upper
dotnet_naming_style.public_const_members_style.word_separator = _
dotnet_naming_symbols.public_const_members_symbols.applicable_kinds = property,field,event,method
dotnet_naming_symbols.public_const_members_symbols.applicable_accessibilities = public,internal,protected,protected_internal,private_protected
dotnet_naming_symbols.public_const_members_symbols.required_modifiers = const

# Private/Local Members
dotnet_naming_rule.private_local_members.severity = warning
dotnet_naming_rule.private_local_members.style = private_local_members_style
dotnet_naming_rule.private_local_members.symbols = private_local_members_symbols
dotnet_naming_style.private_local_members_style.capitalization = camel_case
dotnet_naming_symbols.private_local_members_symbols.applicable_kinds = property,field,event,method,local,local_function
dotnet_naming_symbols.private_local_members_symbols.applicable_accessibilities = private,local

# Private Static/Const Members
dotnet_naming_rule.private_static_const_members.severity = warning
dotnet_naming_rule.private_static_const_members.style = private_static_const_members_style
dotnet_naming_rule.private_static_const_members.symbols = private_static_const_members_symbols
dotnet_naming_style.private_static_const_members_style.capitalization = all_lower
dotnet_naming_style.private_static_const_members_style.word_separator = _
dotnet_naming_symbols.private_static_const_members_symbols.applicable_kinds = property,field,event,method
dotnet_naming_symbols.private_static_const_members_symbols.applicable_accessibilities = private
dotnet_naming_symbols.private_static_const_members_symbols.required_modifiers = static,const

# Local Const Members
dotnet_naming_rule.local_const_members.severity = warning
dotnet_naming_rule.local_const_members.style = local_const_members_style
dotnet_naming_rule.local_const_members.symbols = local_const_members_symbols
dotnet_naming_style.local_const_members_style.capitalization = all_lower
dotnet_naming_style.local_const_members_style.word_separator = _
dotnet_naming_symbols.local_const_members_symbols.applicable_kinds = local
dotnet_naming_symbols.local_const_members_symbols.applicable_accessibilities = local
dotnet_naming_symbols.local_const_members_symbols.required_modifiers = const

# Parameters
dotnet_naming_rule.parameters.severity = warning
dotnet_naming_rule.parameters.style = parameters_style
dotnet_naming_rule.parameters.symbols = parameters_symbols
dotnet_naming_style.parameters_style.capitalization = camel_case
dotnet_naming_symbols.parameters_symbols.applicable_kinds = parameter
dotnet_naming_symbols.parameters_symbols.applicable_accessibilities = *

# Type Parameters
dotnet_naming_rule.type_parameters.severity = warning
dotnet_naming_rule.type_parameters.style = type_parameters_style
dotnet_naming_rule.type_parameters.symbols = type_parameters_symbols
dotnet_naming_style.type_parameters_style.capitalization = pascal_case
dotnet_naming_symbols.type_parameters_symbols.applicable_kinds = type_parameter

# Non-interface Types
dotnet_naming_rule.types.severity = warning
dotnet_naming_rule.types.style = types_style
dotnet_naming_rule.types.symbols = types_symbols
dotnet_naming_style.types_style.capitalization = pascalcase
dotnet_naming_symbols.types_symbols.applicable_kinds = namespace,class,struct,enum,delegate
dotnet_naming_symbols.types_symbols.applicable_accessibilities = *

# Interface Types
dotnet_naming_rule.types_interface.severity = warning
dotnet_naming_rule.types_interface.style = types_interface_style
dotnet_naming_rule.types_interface.symbols = types_interface_symbols
dotnet_naming_style.types_interface_style.capitaization = pascal_case
dotnet_naming_style.types_interface_style.required_prefix = I
dotnet_naming_symbols.types_interface_symbols.applicable_kinds = interface
dotnet_naming_symbols.types_interface_symbols.applicable_accessibilities = *

# Roslynator configuration
dotnet_analyzer_diagnostic.category-roslynator.severity = default
roslynator_analyzers.enabled_by_default = true
roslynator_refactorings.enabled = true
roslynator_compiler_diagnostic_fixes.enabled = true
74 changes: 74 additions & 0 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting one or more of the project maintainers. All complaints
will be reviewed and investigated and will result in a response that is deemed
necessary and appropriate to the circumstances. The project team is obligated to
maintain confidentiality with regard to the reporter of an incident. Further
details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available [here][source].

[homepage]: https://www.contributor-covenant.org
[source]: https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
Loading

0 comments on commit 72d787d

Please sign in to comment.