Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 98e2988d authored by MONSEIGNE Thibaut's avatar MONSEIGNE Thibaut
Browse files

:wrench: Add Config editor & gitattributes

parent 4beb91d5
No related branches found
No related tags found
No related merge requests found
# From:
# - https://github.com/Unity-Technologies/ScriptableRenderPipeline/blob/master/.editorconfig
# - https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference
# - https://github.com/thangchung/clean-code-dotnet/#formatting
root = true
[*]
indent_style = tab
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
# trailing whitespace is significant in markdown (bad choice, bad!)
[*.{md,markdown}]
trim_trailing_whitespace = false
# keep trailing whitespace on prefabs
[*.prefab]
trim_trailing_whitespace = false
# keep these and the VS stuff below in sync with .hgeol's CRLF extensions
[*.{vcproj,bat,cmd,xaml,tt,t4,ttinclude}]
end_of_line = crlf
# this VS-specific stuff is based on experiments to see how VS will modify a file after it has been manually edited.
# the settings are meant to closely match what VS does to minimize unnecessary diffs. this duplicates some settings in *
# but let's be explicit here to be safe (in case someone wants to copy-paste this out to another .editorconfig).
[*.{vcxproj,vcxproj.filters,csproj,props,targets}]
indent_style = space
indent_size = 2
end_of_line = crlf
charset = utf-8-bom
trim_trailing_whitespace = true
insert_final_newline = false
[*.{sln,sln.template}]
indent_style = tab
indent_size = 4
end_of_line = crlf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = false
[*.cs]
# Naming conventions
## Styles
dotnet_naming_style.pascal_case_style.capitalization = pascal_case
dotnet_naming_style.camel_case_style.capitalization = camel_case
dotnet_naming_style.interfaces_prefix_style.capitalization = pascal_case
dotnet_naming_style.interfaces_prefix_style.required_prefix = I
## Use PascalCase on majority of symbols
dotnet_naming_symbols.pascal_case_symbols.applicable_kinds = namespace, class, struct, enum, property, method, event, delegate
dotnet_naming_symbols.pascal_case_symbols.applicable_accessibilities = *
dotnet_naming_rule.pascal_case_naming.symbols = pascal_case_symbols
dotnet_naming_rule.pascal_case_naming.style = pascal_case_style
dotnet_naming_rule.pascal_case_naming.severity = warning
## Use PascalCase on const fields
dotnet_naming_symbols.const_fields.applicable_kinds = field
dotnet_naming_symbols.const_fields.applicable_accessibilities = *
dotnet_naming_symbols.const_fields.required_modifiers = const
dotnet_naming_rule.const_fields_naming.symbols = const_fields
dotnet_naming_rule.const_fields_naming.style = pascal_case_style
dotnet_naming_rule.const_fields_naming.severity = warning
## Use PascalCase on static readonly fields
dotnet_naming_symbols.static_readonly_fields.applicable_kinds = field
dotnet_naming_symbols.static_readonly_fields.applicable_accessibilities = *
dotnet_naming_symbols.static_readonly_fields.required_modifiers = readonly, static
dotnet_naming_rule.static_readonly_fields_naming.symbols = static_readonly_fields
dotnet_naming_rule.static_readonly_fields_naming.style = pascal_case_style
dotnet_naming_rule.static_readonly_fields_naming.severity = warning
## Use camelCase on other fields and parameters
dotnet_naming_symbols.camel_case_symbols.applicable_kinds = field, parameter
dotnet_naming_symbols.camel_case_symbols.applicable_accessibilities = *
dotnet_naming_rule.camel_case_naming.symbols = camel_case_symbols
dotnet_naming_rule.camel_case_naming.style = camel_case_style
dotnet_naming_rule.camel_case_naming.severity = warning
## Prefix interfaces with "I"
dotnet_naming_symbols.interfaces.applicable_kinds = interface
dotnet_naming_symbols.interfaces.applicable_accessibilities = *
dotnet_naming_rule.interfaces_prefix.symbols = interfaces
dotnet_naming_rule.interfaces_prefix.style = interfaces_prefix_style
dotnet_naming_rule.interfaces_prefix.severity = warning
# C# code style rules
## Expression-bodied members
csharp_style_expression_bodied_methods = false:suggestion
csharp_style_expression_bodied_constructors = false:suggestion
csharp_style_expression_bodied_operators = false:suggestion
csharp_style_expression_bodied_properties = true:suggestion
csharp_style_expression_bodied_indexers = true:suggestion
csharp_style_expression_bodied_accessors = true:suggestion
## Expression-level preferences
csharp_prefer_braces = true:warning
dotnet_style_object_initializer = true:suggestion
dotnet_style_collection_initializer = true:suggestion
dotnet_style_explicit_tuple_names = true:suggestion
dotnet_style_null_propagation = true:suggestion
dotnet_style_coalesce_expression = true:suggestion
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
dotnet_style_prefer_inferred_tuple_names = true:suggestion
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
dotnet_style_prefer_auto_properties = true:suggestion
dotnet_style_prefer_conditional_expression_over_assignment = true:suggestion
dotnet_style_prefer_conditional_expression_over_return = true:suggestion
## Parentheses preferences
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 = never_if_unnecessary:suggestion
## Pattern matching
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
csharp_style_inlined_variable_declaration = true:suggestion
## Use language keywords instead of BCL types
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
dotnet_style_predefined_type_for_member_access = true:suggestion
## Modifier preferences
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:warning
## this. preferences
dotnet_style_qualification_for_field = false:suggestion
dotnet_style_qualification_for_property = false:suggestion
dotnet_style_qualification_for_method = false:suggestion
dotnet_style_qualification_for_event = false:suggestion
## Modifier preferences
dotnet_style_require_accessibility_modifiers = for_non_interface_members:warning
dotnet_style_readonly_field = true:suggestion
## Null checking preferences
csharp_style_throw_expression = true:suggestion
csharp_style_conditional_delegate_call = true:suggestion
## Variables
csharp_style_var_for_built_in_types = false:warning
csharp_style_var_when_type_is_apparent = true:suggestion
csharp_style_var_elsewhere = true:suggestion
# C# formatting rules
## Indentation preferences
csharp_indent_block_contents = true
csharp_indent_braces = false
csharp_indent_case_contents = true
csharp_indent_switch_labels = true
csharp_indent_labels = flush_left
## New line preferences
csharp_new_line_before_open_brace = all
csharp_new_line_before_else = true
csharp_new_line_before_catch = true
csharp_new_line_before_finally = true
csharp_new_line_before_members_in_object_initializers = true
csharp_new_line_before_members_in_anonymous_types = true
csharp_new_line_within_query_expression_clauses = true
## Wrapping preferences
csharp_preserve_single_line_statements = true
csharp_preserve_single_line_blocks = true
## Organize usings
dotnet_sort_system_directives_first = true
dotnet_separate_import_directive_groups = false
## Space preferences
csharp_space_after_cast = false
csharp_space_after_colon_in_inheritance_clause = true
csharp_space_after_comma = true
csharp_space_after_dot = false
csharp_space_after_keywords_in_control_flow_statements = true
csharp_space_after_semicolon_in_for_statement = true
csharp_space_around_binary_operators = before_and_after
csharp_space_around_declaration_statements = do_not_ignore
csharp_space_before_colon_in_inheritance_clause = true
csharp_space_before_comma = false
csharp_space_before_dot = false
csharp_space_before_open_square_brackets = false
csharp_space_before_semicolon_in_for_statement = false
csharp_space_between_empty_square_brackets = false
csharp_space_between_method_call_empty_parameter_list_parentheses = false
csharp_space_between_method_call_name_and_opening_parenthesis = false
csharp_space_between_method_call_parameter_list_parentheses = false
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
csharp_space_between_method_declaration_name_and_open_parenthesis = false
csharp_space_between_method_declaration_parameter_list_parentheses = false
csharp_space_between_parentheses = false
csharp_space_between_square_brackets = false
* text=auto
Packages/* text eol=crlf
*.asset text eol=crlf
*.bat text eol=crlf
*.compute text
*.cs text
*.csproj text eol=crlf
.gitattributes text
.gitignore text
*.hlsl text
*.json text
*.mat text eol=crlf
*.md text
*.meta text eol=crlf
*.obj text eol=crlf
*.prefab text eol=crlf
*.puml text
*.renderTexture text eol=crlf
*.sln text eol=crlf
*.txt text
*.unity text eol=crlf
*.xml text
*.yml text
*.fbx binary
*.ico binary
*.nb binary
*.png binary
*.ttf binary
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment