#144 Ajout des fichiers commit-msg et pre-commit. Modification de .editorconfig pour ajouter des règles personnalisées. Exclusion de Progam.cs pour l'erreur SA1200.
This commit is contained in:
500
.editorconfig
500
.editorconfig
@@ -1,64 +1,59 @@
|
|||||||
root = true
|
root = true
|
||||||
|
|
||||||
# All files
|
# ============================================================
|
||||||
|
# ALL FILES
|
||||||
|
# ============================================================
|
||||||
[*]
|
[*]
|
||||||
indent_style = space
|
indent_style = space
|
||||||
|
|
||||||
# Xml files
|
# ============================================================
|
||||||
|
# XML FILES
|
||||||
|
# ============================================================
|
||||||
[*.xml]
|
[*.xml]
|
||||||
indent_size = 2
|
indent_size = 2
|
||||||
|
|
||||||
# Xml project files
|
|
||||||
[*.{csproj,fsproj,vbproj,proj,slnx}]
|
[*.{csproj,fsproj,vbproj,proj,slnx}]
|
||||||
indent_size = 2
|
indent_size = 2
|
||||||
|
|
||||||
# Xml config files
|
|
||||||
[*.{props,targets,config,nuspec}]
|
[*.{props,targets,config,nuspec}]
|
||||||
indent_size = 2
|
indent_size = 2
|
||||||
|
|
||||||
|
# ============================================================
|
||||||
|
# JSON FILES
|
||||||
|
# ============================================================
|
||||||
[*.json]
|
[*.json]
|
||||||
indent_size = 2
|
indent_size = 2
|
||||||
|
|
||||||
# C# files
|
# ============================================================
|
||||||
[*.cs]
|
# C# AND VB FILES — SHARED .NET CONVENTIONS
|
||||||
|
# ============================================================
|
||||||
#### Core EditorConfig Options ####
|
|
||||||
|
|
||||||
# Indentation and spacing
|
|
||||||
indent_size = 4
|
|
||||||
tab_width = 4
|
|
||||||
|
|
||||||
# New line preferences
|
|
||||||
insert_final_newline = false
|
|
||||||
|
|
||||||
#### .NET Coding Conventions ####
|
|
||||||
[*.{cs,vb}]
|
[*.{cs,vb}]
|
||||||
|
|
||||||
# Organize usings
|
#### Organize Usings ####
|
||||||
dotnet_separate_import_directive_groups = true
|
dotnet_separate_import_directive_groups = true
|
||||||
dotnet_sort_system_directives_first = true
|
dotnet_sort_system_directives_first = true
|
||||||
file_header_template = unset
|
file_header_template = unset
|
||||||
|
|
||||||
# this. and Me. preferences
|
#### this. and Me. Preferences ####
|
||||||
dotnet_style_qualification_for_event = false:silent
|
dotnet_style_qualification_for_event = false:silent
|
||||||
dotnet_style_qualification_for_field = false:silent
|
dotnet_style_qualification_for_field = false:silent
|
||||||
dotnet_style_qualification_for_method = false:silent
|
dotnet_style_qualification_for_method = false:silent
|
||||||
dotnet_style_qualification_for_property = false:silent
|
dotnet_style_qualification_for_property = false:silent
|
||||||
|
|
||||||
# Language keywords vs BCL types preferences
|
#### Language Keywords vs BCL Types ####
|
||||||
dotnet_style_predefined_type_for_locals_parameters_members = true:silent
|
dotnet_style_predefined_type_for_locals_parameters_members = true:silent
|
||||||
dotnet_style_predefined_type_for_member_access = true:silent
|
dotnet_style_predefined_type_for_member_access = true:silent
|
||||||
|
|
||||||
# Parentheses preferences
|
#### Parentheses Preferences ####
|
||||||
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent
|
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent
|
||||||
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent
|
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent
|
||||||
dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent
|
dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent
|
||||||
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent
|
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent
|
||||||
|
|
||||||
# Modifier preferences
|
#### Modifier Preferences ####
|
||||||
dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent
|
dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent
|
||||||
|
|
||||||
# Expression-level preferences
|
#### Expression-Level Preferences ####
|
||||||
dotnet_style_coalesce_expression = true:suggestion
|
dotnet_style_coalesce_expression = true:suggestion
|
||||||
dotnet_style_collection_initializer = true:suggestion
|
dotnet_style_collection_initializer = true:suggestion
|
||||||
dotnet_style_explicit_tuple_names = true:suggestion
|
dotnet_style_explicit_tuple_names = true:suggestion
|
||||||
@@ -78,129 +73,30 @@ dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggesti
|
|||||||
dotnet_style_prefer_simplified_boolean_expressions = true:suggestion
|
dotnet_style_prefer_simplified_boolean_expressions = true:suggestion
|
||||||
dotnet_style_prefer_simplified_interpolation = true:suggestion
|
dotnet_style_prefer_simplified_interpolation = true:suggestion
|
||||||
|
|
||||||
# Field preferences
|
#### Field Preferences ####
|
||||||
dotnet_style_readonly_field = true:warning
|
dotnet_style_readonly_field = true:warning
|
||||||
|
|
||||||
# Parameter preferences
|
#### Parameter Preferences ####
|
||||||
dotnet_code_quality_unused_parameters = all:suggestion
|
dotnet_code_quality_unused_parameters = all:suggestion
|
||||||
|
|
||||||
# Suppression preferences
|
#### Suppression Preferences ####
|
||||||
dotnet_remove_unnecessary_suppression_exclusions = none
|
dotnet_remove_unnecessary_suppression_exclusions = none
|
||||||
|
|
||||||
#### C# Coding Conventions ####
|
#### Diagnostics ####
|
||||||
[*.cs]
|
dotnet_diagnostic.IDE0005.severity = warning # Remove unused usings
|
||||||
|
dotnet_diagnostic.IDE0073.severity = none # File header not required
|
||||||
|
dotnet_diagnostic.SA1600.severity = warning # Elements should be documented
|
||||||
|
dotnet_diagnostic.SA1623.severity = none # Property summary text
|
||||||
|
dotnet_diagnostic.SA1624.severity = none # Property summary text
|
||||||
|
dotnet_diagnostic.SA1633.severity = none # File header not required
|
||||||
|
dotnet_diagnostic.SA1642.severity = suggestion # Constructor summary text
|
||||||
|
|
||||||
# var preferences
|
# ============================================================
|
||||||
csharp_style_var_elsewhere = false:silent
|
# NAMING RULES
|
||||||
csharp_style_var_for_built_in_types = false:silent
|
# ============================================================
|
||||||
csharp_style_var_when_type_is_apparent = false:silent
|
|
||||||
|
|
||||||
# Expression-bodied members
|
|
||||||
csharp_style_expression_bodied_accessors = true:silent
|
|
||||||
csharp_style_expression_bodied_constructors = false:silent
|
|
||||||
csharp_style_expression_bodied_indexers = true:silent
|
|
||||||
csharp_style_expression_bodied_lambdas = true:suggestion
|
|
||||||
csharp_style_expression_bodied_local_functions = false:silent
|
|
||||||
csharp_style_expression_bodied_methods = false:silent
|
|
||||||
csharp_style_expression_bodied_operators = false:silent
|
|
||||||
csharp_style_expression_bodied_properties = true:silent
|
|
||||||
|
|
||||||
# Pattern matching preferences
|
|
||||||
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
|
|
||||||
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
|
|
||||||
csharp_style_prefer_extended_property_pattern = true:suggestion
|
|
||||||
csharp_style_prefer_not_pattern = true:suggestion
|
|
||||||
csharp_style_prefer_pattern_matching = true:silent
|
|
||||||
csharp_style_prefer_switch_expression = true:suggestion
|
|
||||||
|
|
||||||
# Null-checking preferences
|
|
||||||
csharp_style_conditional_delegate_call = true:suggestion
|
|
||||||
|
|
||||||
# Modifier preferences
|
|
||||||
csharp_prefer_static_anonymous_function = true:suggestion
|
|
||||||
csharp_prefer_static_local_function = true:warning
|
|
||||||
csharp_preferred_modifier_order = public,private,protected,internal,file,const,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,required,volatile,async:suggestion
|
|
||||||
csharp_style_prefer_readonly_struct = true:suggestion
|
|
||||||
csharp_style_prefer_readonly_struct_member = true:suggestion
|
|
||||||
|
|
||||||
# Code-block preferences
|
|
||||||
csharp_prefer_braces = true:silent
|
|
||||||
csharp_prefer_simple_using_statement = true:suggestion
|
|
||||||
csharp_style_namespace_declarations = file_scoped:suggestion
|
|
||||||
csharp_style_prefer_method_group_conversion = true:silent
|
|
||||||
csharp_style_prefer_primary_constructors = true:suggestion
|
|
||||||
csharp_style_prefer_top_level_statements = true:silent
|
|
||||||
|
|
||||||
# Expression-level preferences
|
|
||||||
csharp_prefer_simple_default_expression = true:suggestion
|
|
||||||
csharp_style_deconstructed_variable_declaration = true:suggestion
|
|
||||||
csharp_style_implicit_object_creation_when_type_is_apparent = true:suggestion
|
|
||||||
csharp_style_inlined_variable_declaration = true:suggestion
|
|
||||||
csharp_style_prefer_index_operator = true:suggestion
|
|
||||||
csharp_style_prefer_local_over_anonymous_function = true:suggestion
|
|
||||||
csharp_style_prefer_null_check_over_type_check = true:suggestion
|
|
||||||
csharp_style_prefer_range_operator = true:suggestion
|
|
||||||
csharp_style_prefer_tuple_swap = true:suggestion
|
|
||||||
csharp_style_prefer_utf8_string_literals = true:suggestion
|
|
||||||
csharp_style_throw_expression = true:suggestion
|
|
||||||
csharp_style_unused_value_assignment_preference = discard_variable:suggestion
|
|
||||||
csharp_style_unused_value_expression_statement_preference = discard_variable:silent
|
|
||||||
|
|
||||||
# 'using' directive preferences
|
|
||||||
csharp_using_directive_placement = outside_namespace:silent
|
|
||||||
|
|
||||||
#### C# Formatting Rules ####
|
|
||||||
|
|
||||||
# New line preferences
|
|
||||||
csharp_new_line_before_catch = true
|
|
||||||
csharp_new_line_before_else = true
|
|
||||||
csharp_new_line_before_finally = true
|
|
||||||
csharp_new_line_before_members_in_anonymous_types = true
|
|
||||||
csharp_new_line_before_members_in_object_initializers = true
|
|
||||||
csharp_new_line_before_open_brace = all
|
|
||||||
csharp_new_line_between_query_expression_clauses = true
|
|
||||||
|
|
||||||
# Indentation preferences
|
|
||||||
csharp_indent_block_contents = true
|
|
||||||
csharp_indent_braces = false
|
|
||||||
csharp_indent_case_contents = true
|
|
||||||
csharp_indent_case_contents_when_block = true
|
|
||||||
csharp_indent_labels = one_less_than_current
|
|
||||||
csharp_indent_switch_labels = true
|
|
||||||
|
|
||||||
# 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 = false
|
|
||||||
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
|
|
||||||
|
|
||||||
# Wrapping preferences
|
|
||||||
csharp_preserve_single_line_blocks = true
|
|
||||||
csharp_preserve_single_line_statements = true
|
|
||||||
|
|
||||||
#### Naming styles ####
|
|
||||||
[*.{cs,vb}]
|
[*.{cs,vb}]
|
||||||
|
|
||||||
# Naming rules
|
## Rules ##
|
||||||
|
|
||||||
dotnet_naming_rule.types_and_namespaces_should_be_pascalcase.severity = suggestion
|
dotnet_naming_rule.types_and_namespaces_should_be_pascalcase.severity = suggestion
|
||||||
dotnet_naming_rule.types_and_namespaces_should_be_pascalcase.symbols = types_and_namespaces
|
dotnet_naming_rule.types_and_namespaces_should_be_pascalcase.symbols = types_and_namespaces
|
||||||
dotnet_naming_rule.types_and_namespaces_should_be_pascalcase.style = pascalcase
|
dotnet_naming_rule.types_and_namespaces_should_be_pascalcase.style = pascalcase
|
||||||
@@ -225,6 +121,38 @@ dotnet_naming_rule.events_should_be_pascalcase.severity = suggestion
|
|||||||
dotnet_naming_rule.events_should_be_pascalcase.symbols = events
|
dotnet_naming_rule.events_should_be_pascalcase.symbols = events
|
||||||
dotnet_naming_rule.events_should_be_pascalcase.style = pascalcase
|
dotnet_naming_rule.events_should_be_pascalcase.style = pascalcase
|
||||||
|
|
||||||
|
dotnet_naming_rule.public_fields_should_be_pascalcase.severity = suggestion
|
||||||
|
dotnet_naming_rule.public_fields_should_be_pascalcase.symbols = public_fields
|
||||||
|
dotnet_naming_rule.public_fields_should_be_pascalcase.style = pascalcase
|
||||||
|
|
||||||
|
dotnet_naming_rule.public_constant_fields_should_be_pascalcase.severity = suggestion
|
||||||
|
dotnet_naming_rule.public_constant_fields_should_be_pascalcase.symbols = public_constant_fields
|
||||||
|
dotnet_naming_rule.public_constant_fields_should_be_pascalcase.style = pascalcase
|
||||||
|
|
||||||
|
dotnet_naming_rule.public_static_readonly_fields_should_be_pascalcase.severity = suggestion
|
||||||
|
dotnet_naming_rule.public_static_readonly_fields_should_be_pascalcase.symbols = public_static_readonly_fields
|
||||||
|
dotnet_naming_rule.public_static_readonly_fields_should_be_pascalcase.style = pascalcase
|
||||||
|
|
||||||
|
dotnet_naming_rule.private_fields_should_be__camelcase.severity = suggestion
|
||||||
|
dotnet_naming_rule.private_fields_should_be__camelcase.symbols = private_fields
|
||||||
|
dotnet_naming_rule.private_fields_should_be__camelcase.style = _camelcase
|
||||||
|
|
||||||
|
dotnet_naming_rule.private_static_fields_should_be_s_camelcase.severity = suggestion
|
||||||
|
dotnet_naming_rule.private_static_fields_should_be_s_camelcase.symbols = private_static_fields
|
||||||
|
dotnet_naming_rule.private_static_fields_should_be_s_camelcase.style = s_camelcase
|
||||||
|
|
||||||
|
dotnet_naming_rule.private_constant_fields_should_be_pascalcase.severity = suggestion
|
||||||
|
dotnet_naming_rule.private_constant_fields_should_be_pascalcase.symbols = private_constant_fields
|
||||||
|
dotnet_naming_rule.private_constant_fields_should_be_pascalcase.style = pascalcase
|
||||||
|
|
||||||
|
dotnet_naming_rule.private_static_readonly_fields_should_be_pascalcase.severity = suggestion
|
||||||
|
dotnet_naming_rule.private_static_readonly_fields_should_be_pascalcase.symbols = private_static_readonly_fields
|
||||||
|
dotnet_naming_rule.private_static_readonly_fields_should_be_pascalcase.style = pascalcase
|
||||||
|
|
||||||
|
dotnet_naming_rule.enums_should_be_pascalcase.severity = suggestion
|
||||||
|
dotnet_naming_rule.enums_should_be_pascalcase.symbols = enums
|
||||||
|
dotnet_naming_rule.enums_should_be_pascalcase.style = pascalcase
|
||||||
|
|
||||||
dotnet_naming_rule.local_variables_should_be_camelcase.severity = suggestion
|
dotnet_naming_rule.local_variables_should_be_camelcase.severity = suggestion
|
||||||
dotnet_naming_rule.local_variables_should_be_camelcase.symbols = local_variables
|
dotnet_naming_rule.local_variables_should_be_camelcase.symbols = local_variables
|
||||||
dotnet_naming_rule.local_variables_should_be_camelcase.style = camelcase
|
dotnet_naming_rule.local_variables_should_be_camelcase.style = camelcase
|
||||||
@@ -237,38 +165,6 @@ dotnet_naming_rule.parameters_should_be_camelcase.severity = suggestion
|
|||||||
dotnet_naming_rule.parameters_should_be_camelcase.symbols = parameters
|
dotnet_naming_rule.parameters_should_be_camelcase.symbols = parameters
|
||||||
dotnet_naming_rule.parameters_should_be_camelcase.style = camelcase
|
dotnet_naming_rule.parameters_should_be_camelcase.style = camelcase
|
||||||
|
|
||||||
dotnet_naming_rule.public_fields_should_be_pascalcase.severity = suggestion
|
|
||||||
dotnet_naming_rule.public_fields_should_be_pascalcase.symbols = public_fields
|
|
||||||
dotnet_naming_rule.public_fields_should_be_pascalcase.style = pascalcase
|
|
||||||
|
|
||||||
dotnet_naming_rule.private_fields_should_be__camelcase.severity = suggestion
|
|
||||||
dotnet_naming_rule.private_fields_should_be__camelcase.symbols = private_fields
|
|
||||||
dotnet_naming_rule.private_fields_should_be__camelcase.style = _camelcase
|
|
||||||
|
|
||||||
dotnet_naming_rule.private_static_fields_should_be_s_camelcase.severity = suggestion
|
|
||||||
dotnet_naming_rule.private_static_fields_should_be_s_camelcase.symbols = private_static_fields
|
|
||||||
dotnet_naming_rule.private_static_fields_should_be_s_camelcase.style = s_camelcase
|
|
||||||
|
|
||||||
dotnet_naming_rule.public_constant_fields_should_be_pascalcase.severity = suggestion
|
|
||||||
dotnet_naming_rule.public_constant_fields_should_be_pascalcase.symbols = public_constant_fields
|
|
||||||
dotnet_naming_rule.public_constant_fields_should_be_pascalcase.style = pascalcase
|
|
||||||
|
|
||||||
dotnet_naming_rule.private_constant_fields_should_be_pascalcase.severity = suggestion
|
|
||||||
dotnet_naming_rule.private_constant_fields_should_be_pascalcase.symbols = private_constant_fields
|
|
||||||
dotnet_naming_rule.private_constant_fields_should_be_pascalcase.style = pascalcase
|
|
||||||
|
|
||||||
dotnet_naming_rule.public_static_readonly_fields_should_be_pascalcase.severity = suggestion
|
|
||||||
dotnet_naming_rule.public_static_readonly_fields_should_be_pascalcase.symbols = public_static_readonly_fields
|
|
||||||
dotnet_naming_rule.public_static_readonly_fields_should_be_pascalcase.style = pascalcase
|
|
||||||
|
|
||||||
dotnet_naming_rule.private_static_readonly_fields_should_be_pascalcase.severity = suggestion
|
|
||||||
dotnet_naming_rule.private_static_readonly_fields_should_be_pascalcase.symbols = private_static_readonly_fields
|
|
||||||
dotnet_naming_rule.private_static_readonly_fields_should_be_pascalcase.style = pascalcase
|
|
||||||
|
|
||||||
dotnet_naming_rule.enums_should_be_pascalcase.severity = suggestion
|
|
||||||
dotnet_naming_rule.enums_should_be_pascalcase.symbols = enums
|
|
||||||
dotnet_naming_rule.enums_should_be_pascalcase.style = pascalcase
|
|
||||||
|
|
||||||
dotnet_naming_rule.local_functions_should_be_pascalcase.severity = suggestion
|
dotnet_naming_rule.local_functions_should_be_pascalcase.severity = suggestion
|
||||||
dotnet_naming_rule.local_functions_should_be_pascalcase.symbols = local_functions
|
dotnet_naming_rule.local_functions_should_be_pascalcase.symbols = local_functions
|
||||||
dotnet_naming_rule.local_functions_should_be_pascalcase.style = pascalcase
|
dotnet_naming_rule.local_functions_should_be_pascalcase.style = pascalcase
|
||||||
@@ -277,67 +173,35 @@ dotnet_naming_rule.non_field_members_should_be_pascalcase.severity = suggestion
|
|||||||
dotnet_naming_rule.non_field_members_should_be_pascalcase.symbols = non_field_members
|
dotnet_naming_rule.non_field_members_should_be_pascalcase.symbols = non_field_members
|
||||||
dotnet_naming_rule.non_field_members_should_be_pascalcase.style = pascalcase
|
dotnet_naming_rule.non_field_members_should_be_pascalcase.style = pascalcase
|
||||||
|
|
||||||
# Symbol specifications
|
## Symbol Specifications ##
|
||||||
|
dotnet_naming_symbols.types_and_namespaces.applicable_kinds = namespace, class, struct, interface, enum
|
||||||
|
dotnet_naming_symbols.types_and_namespaces.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||||
|
dotnet_naming_symbols.types_and_namespaces.required_modifiers =
|
||||||
|
|
||||||
dotnet_naming_symbols.interfaces.applicable_kinds = interface
|
dotnet_naming_symbols.interfaces.applicable_kinds = interface
|
||||||
dotnet_naming_symbols.interfaces.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
dotnet_naming_symbols.interfaces.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||||
dotnet_naming_symbols.interfaces.required_modifiers =
|
dotnet_naming_symbols.interfaces.required_modifiers =
|
||||||
|
|
||||||
dotnet_naming_symbols.enums.applicable_kinds = enum
|
# NOTE: was previously misconfigured as 'namespace' kind — corrected to 'type_parameter'
|
||||||
dotnet_naming_symbols.enums.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
dotnet_naming_symbols.type_parameters.applicable_kinds = type_parameter
|
||||||
dotnet_naming_symbols.enums.required_modifiers =
|
dotnet_naming_symbols.type_parameters.applicable_accessibilities = *
|
||||||
|
dotnet_naming_symbols.type_parameters.required_modifiers =
|
||||||
dotnet_naming_symbols.events.applicable_kinds = event
|
|
||||||
dotnet_naming_symbols.events.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
|
||||||
dotnet_naming_symbols.events.required_modifiers =
|
|
||||||
|
|
||||||
dotnet_naming_symbols.methods.applicable_kinds = method
|
dotnet_naming_symbols.methods.applicable_kinds = method
|
||||||
dotnet_naming_symbols.methods.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
dotnet_naming_symbols.methods.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||||
dotnet_naming_symbols.methods.required_modifiers =
|
dotnet_naming_symbols.methods.required_modifiers =
|
||||||
|
|
||||||
dotnet_naming_symbols.properties.applicable_kinds = property
|
dotnet_naming_symbols.properties.applicable_kinds = property
|
||||||
dotnet_naming_symbols.properties.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
dotnet_naming_symbols.properties.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||||
dotnet_naming_symbols.properties.required_modifiers =
|
dotnet_naming_symbols.properties.required_modifiers =
|
||||||
|
|
||||||
|
dotnet_naming_symbols.events.applicable_kinds = event
|
||||||
|
dotnet_naming_symbols.events.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||||
|
dotnet_naming_symbols.events.required_modifiers =
|
||||||
|
|
||||||
dotnet_naming_symbols.public_fields.applicable_kinds = field
|
dotnet_naming_symbols.public_fields.applicable_kinds = field
|
||||||
dotnet_naming_symbols.public_fields.applicable_accessibilities = public, internal
|
dotnet_naming_symbols.public_fields.applicable_accessibilities = public, internal
|
||||||
dotnet_naming_symbols.public_fields.required_modifiers =
|
dotnet_naming_symbols.public_fields.required_modifiers =
|
||||||
|
|
||||||
dotnet_naming_symbols.private_fields.applicable_kinds = field
|
|
||||||
dotnet_naming_symbols.private_fields.applicable_accessibilities = private, protected, protected_internal, private_protected
|
|
||||||
dotnet_naming_symbols.private_fields.required_modifiers =
|
|
||||||
|
|
||||||
dotnet_naming_symbols.private_static_fields.applicable_kinds = field
|
|
||||||
dotnet_naming_symbols.private_static_fields.applicable_accessibilities = private, protected, protected_internal, private_protected
|
|
||||||
dotnet_naming_symbols.private_static_fields.required_modifiers = static
|
|
||||||
|
|
||||||
dotnet_naming_symbols.types_and_namespaces.applicable_kinds = namespace, class, struct, interface, enum
|
|
||||||
dotnet_naming_symbols.types_and_namespaces.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
|
||||||
dotnet_naming_symbols.types_and_namespaces.required_modifiers =
|
|
||||||
|
|
||||||
dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
|
|
||||||
dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
|
||||||
dotnet_naming_symbols.non_field_members.required_modifiers =
|
|
||||||
|
|
||||||
dotnet_naming_symbols.type_parameters.applicable_kinds = namespace
|
|
||||||
dotnet_naming_symbols.type_parameters.applicable_accessibilities = *
|
|
||||||
dotnet_naming_symbols.type_parameters.required_modifiers =
|
|
||||||
|
|
||||||
dotnet_naming_symbols.private_constant_fields.applicable_kinds = field
|
|
||||||
dotnet_naming_symbols.private_constant_fields.applicable_accessibilities = private, protected, protected_internal, private_protected
|
|
||||||
dotnet_naming_symbols.private_constant_fields.required_modifiers = const
|
|
||||||
|
|
||||||
dotnet_naming_symbols.local_variables.applicable_kinds = local
|
|
||||||
dotnet_naming_symbols.local_variables.applicable_accessibilities = local
|
|
||||||
dotnet_naming_symbols.local_variables.required_modifiers =
|
|
||||||
|
|
||||||
dotnet_naming_symbols.local_constants.applicable_kinds = local
|
|
||||||
dotnet_naming_symbols.local_constants.applicable_accessibilities = local
|
|
||||||
dotnet_naming_symbols.local_constants.required_modifiers = const
|
|
||||||
|
|
||||||
dotnet_naming_symbols.parameters.applicable_kinds = parameter
|
|
||||||
dotnet_naming_symbols.parameters.applicable_accessibilities = *
|
|
||||||
dotnet_naming_symbols.parameters.required_modifiers =
|
|
||||||
|
|
||||||
dotnet_naming_symbols.public_constant_fields.applicable_kinds = field
|
dotnet_naming_symbols.public_constant_fields.applicable_kinds = field
|
||||||
dotnet_naming_symbols.public_constant_fields.applicable_accessibilities = public, internal
|
dotnet_naming_symbols.public_constant_fields.applicable_accessibilities = public, internal
|
||||||
@@ -347,57 +211,193 @@ dotnet_naming_symbols.public_static_readonly_fields.applicable_kinds = field
|
|||||||
dotnet_naming_symbols.public_static_readonly_fields.applicable_accessibilities = public, internal
|
dotnet_naming_symbols.public_static_readonly_fields.applicable_accessibilities = public, internal
|
||||||
dotnet_naming_symbols.public_static_readonly_fields.required_modifiers = readonly, static
|
dotnet_naming_symbols.public_static_readonly_fields.required_modifiers = readonly, static
|
||||||
|
|
||||||
|
dotnet_naming_symbols.private_fields.applicable_kinds = field
|
||||||
|
dotnet_naming_symbols.private_fields.applicable_accessibilities = private, protected, protected_internal, private_protected
|
||||||
|
dotnet_naming_symbols.private_fields.required_modifiers =
|
||||||
|
|
||||||
|
dotnet_naming_symbols.private_static_fields.applicable_kinds = field
|
||||||
|
dotnet_naming_symbols.private_static_fields.applicable_accessibilities = private, protected, protected_internal, private_protected
|
||||||
|
dotnet_naming_symbols.private_static_fields.required_modifiers = static
|
||||||
|
|
||||||
|
dotnet_naming_symbols.private_constant_fields.applicable_kinds = field
|
||||||
|
dotnet_naming_symbols.private_constant_fields.applicable_accessibilities = private, protected, protected_internal, private_protected
|
||||||
|
dotnet_naming_symbols.private_constant_fields.required_modifiers = const
|
||||||
|
|
||||||
dotnet_naming_symbols.private_static_readonly_fields.applicable_kinds = field
|
dotnet_naming_symbols.private_static_readonly_fields.applicable_kinds = field
|
||||||
dotnet_naming_symbols.private_static_readonly_fields.applicable_accessibilities = private, protected, protected_internal, private_protected
|
dotnet_naming_symbols.private_static_readonly_fields.applicable_accessibilities = private, protected, protected_internal, private_protected
|
||||||
dotnet_naming_symbols.private_static_readonly_fields.required_modifiers = readonly, static
|
dotnet_naming_symbols.private_static_readonly_fields.required_modifiers = readonly, static
|
||||||
|
|
||||||
|
dotnet_naming_symbols.enums.applicable_kinds = enum
|
||||||
|
dotnet_naming_symbols.enums.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||||
|
dotnet_naming_symbols.enums.required_modifiers =
|
||||||
|
|
||||||
|
dotnet_naming_symbols.local_variables.applicable_kinds = local
|
||||||
|
dotnet_naming_symbols.local_variables.applicable_accessibilities = local
|
||||||
|
dotnet_naming_symbols.local_variables.required_modifiers =
|
||||||
|
|
||||||
|
dotnet_naming_symbols.local_constants.applicable_kinds = local
|
||||||
|
dotnet_naming_symbols.local_constants.applicable_accessibilities = local
|
||||||
|
dotnet_naming_symbols.local_constants.required_modifiers = const
|
||||||
|
|
||||||
|
dotnet_naming_symbols.parameters.applicable_kinds = parameter
|
||||||
|
dotnet_naming_symbols.parameters.applicable_accessibilities = *
|
||||||
|
dotnet_naming_symbols.parameters.required_modifiers =
|
||||||
|
|
||||||
dotnet_naming_symbols.local_functions.applicable_kinds = local_function
|
dotnet_naming_symbols.local_functions.applicable_kinds = local_function
|
||||||
dotnet_naming_symbols.local_functions.applicable_accessibilities = *
|
dotnet_naming_symbols.local_functions.applicable_accessibilities = *
|
||||||
dotnet_naming_symbols.local_functions.required_modifiers =
|
dotnet_naming_symbols.local_functions.required_modifiers =
|
||||||
|
|
||||||
# Naming styles
|
dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
|
||||||
|
dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||||
|
dotnet_naming_symbols.non_field_members.required_modifiers =
|
||||||
|
|
||||||
dotnet_naming_style.pascalcase.required_prefix =
|
## Naming Styles ##
|
||||||
dotnet_naming_style.pascalcase.required_suffix =
|
|
||||||
dotnet_naming_style.pascalcase.word_separator =
|
|
||||||
dotnet_naming_style.pascalcase.capitalization = pascal_case
|
dotnet_naming_style.pascalcase.capitalization = pascal_case
|
||||||
|
dotnet_naming_style.pascalcase.required_prefix =
|
||||||
|
dotnet_naming_style.pascalcase.required_suffix =
|
||||||
|
dotnet_naming_style.pascalcase.word_separator =
|
||||||
|
|
||||||
dotnet_naming_style.ipascalcase.required_prefix = I
|
|
||||||
dotnet_naming_style.ipascalcase.required_suffix =
|
|
||||||
dotnet_naming_style.ipascalcase.word_separator =
|
|
||||||
dotnet_naming_style.ipascalcase.capitalization = pascal_case
|
dotnet_naming_style.ipascalcase.capitalization = pascal_case
|
||||||
|
dotnet_naming_style.ipascalcase.required_prefix = I
|
||||||
|
dotnet_naming_style.ipascalcase.required_suffix =
|
||||||
|
dotnet_naming_style.ipascalcase.word_separator =
|
||||||
|
|
||||||
dotnet_naming_style.tpascalcase.required_prefix = T
|
|
||||||
dotnet_naming_style.tpascalcase.required_suffix =
|
|
||||||
dotnet_naming_style.tpascalcase.word_separator =
|
|
||||||
dotnet_naming_style.tpascalcase.capitalization = pascal_case
|
dotnet_naming_style.tpascalcase.capitalization = pascal_case
|
||||||
|
dotnet_naming_style.tpascalcase.required_prefix = T
|
||||||
|
dotnet_naming_style.tpascalcase.required_suffix =
|
||||||
|
dotnet_naming_style.tpascalcase.word_separator =
|
||||||
|
|
||||||
dotnet_naming_style._camelcase.required_prefix = _
|
|
||||||
dotnet_naming_style._camelcase.required_suffix =
|
|
||||||
dotnet_naming_style._camelcase.word_separator =
|
|
||||||
dotnet_naming_style._camelcase.capitalization = camel_case
|
|
||||||
|
|
||||||
dotnet_naming_style.camelcase.required_prefix =
|
|
||||||
dotnet_naming_style.camelcase.required_suffix =
|
|
||||||
dotnet_naming_style.camelcase.word_separator =
|
|
||||||
dotnet_naming_style.camelcase.capitalization = camel_case
|
dotnet_naming_style.camelcase.capitalization = camel_case
|
||||||
|
dotnet_naming_style.camelcase.required_prefix =
|
||||||
|
dotnet_naming_style.camelcase.required_suffix =
|
||||||
|
dotnet_naming_style.camelcase.word_separator =
|
||||||
|
|
||||||
|
dotnet_naming_style._camelcase.capitalization = camel_case
|
||||||
|
dotnet_naming_style._camelcase.required_prefix = _
|
||||||
|
dotnet_naming_style._camelcase.required_suffix =
|
||||||
|
dotnet_naming_style._camelcase.word_separator =
|
||||||
|
|
||||||
dotnet_naming_style.s_camelcase.required_prefix = s_
|
|
||||||
dotnet_naming_style.s_camelcase.required_suffix =
|
|
||||||
dotnet_naming_style.s_camelcase.word_separator =
|
|
||||||
dotnet_naming_style.s_camelcase.capitalization = camel_case
|
dotnet_naming_style.s_camelcase.capitalization = camel_case
|
||||||
|
dotnet_naming_style.s_camelcase.required_prefix = s_
|
||||||
|
dotnet_naming_style.s_camelcase.required_suffix =
|
||||||
|
dotnet_naming_style.s_camelcase.word_separator =
|
||||||
|
|
||||||
dotnet_diagnostic.SA1623.severity = none
|
# ============================================================
|
||||||
dotnet_diagnostic.SA1624.severity = none
|
# C# FILES ONLY
|
||||||
|
# ============================================================
|
||||||
dotnet_diagnostic.SA1600.severity = suggestion
|
|
||||||
|
|
||||||
[*.cs]
|
[*.cs]
|
||||||
# 1. Tell the .NET Formatter to stop injecting a header
|
|
||||||
file_header_template = unset
|
|
||||||
|
|
||||||
# 2. Tell StyleCop to stop requiring a file header (SA1633)
|
#### Core EditorConfig Options ####
|
||||||
dotnet_diagnostic.SA1633.severity = none
|
indent_size = 4
|
||||||
|
tab_width = 4
|
||||||
|
insert_final_newline = false
|
||||||
|
|
||||||
# 3. Tell the IDE to stop requiring a file header (IDE0073)
|
#### var Preferences ####
|
||||||
dotnet_diagnostic.IDE0073.severity = none
|
csharp_style_var_elsewhere = false:silent
|
||||||
|
csharp_style_var_for_built_in_types = false:silent
|
||||||
|
csharp_style_var_when_type_is_apparent = false:silent
|
||||||
|
|
||||||
|
#### Expression-Bodied Members ####
|
||||||
|
csharp_style_expression_bodied_accessors = true:silent
|
||||||
|
csharp_style_expression_bodied_constructors = false:silent
|
||||||
|
csharp_style_expression_bodied_indexers = true:silent
|
||||||
|
csharp_style_expression_bodied_lambdas = true:suggestion
|
||||||
|
csharp_style_expression_bodied_local_functions = false:silent
|
||||||
|
csharp_style_expression_bodied_methods = false:silent
|
||||||
|
csharp_style_expression_bodied_operators = false:silent
|
||||||
|
csharp_style_expression_bodied_properties = true:silent
|
||||||
|
|
||||||
|
#### Pattern Matching Preferences ####
|
||||||
|
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
|
||||||
|
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
|
||||||
|
csharp_style_prefer_extended_property_pattern = true:suggestion
|
||||||
|
csharp_style_prefer_not_pattern = true:suggestion
|
||||||
|
csharp_style_prefer_pattern_matching = true:silent
|
||||||
|
csharp_style_prefer_switch_expression = true:suggestion
|
||||||
|
|
||||||
|
#### Null-Checking Preferences ####
|
||||||
|
csharp_style_conditional_delegate_call = true:suggestion
|
||||||
|
|
||||||
|
#### Modifier Preferences ####
|
||||||
|
csharp_prefer_static_anonymous_function = true:suggestion
|
||||||
|
csharp_prefer_static_local_function = true:warning
|
||||||
|
csharp_preferred_modifier_order = public,private,protected,internal,file,const,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,required,volatile,async:suggestion
|
||||||
|
csharp_style_prefer_readonly_struct = true:suggestion
|
||||||
|
csharp_style_prefer_readonly_struct_member = true:suggestion
|
||||||
|
|
||||||
|
#### Code-Block Preferences ####
|
||||||
|
csharp_prefer_braces = true:silent
|
||||||
|
csharp_prefer_simple_using_statement = true:suggestion
|
||||||
|
csharp_style_namespace_declarations = file_scoped:suggestion
|
||||||
|
csharp_style_prefer_method_group_conversion = true:silent
|
||||||
|
csharp_style_prefer_primary_constructors = true:suggestion
|
||||||
|
csharp_style_prefer_top_level_statements = true:silent
|
||||||
|
|
||||||
|
#### Expression-Level Preferences ####
|
||||||
|
csharp_prefer_simple_default_expression = true:suggestion
|
||||||
|
csharp_style_deconstructed_variable_declaration = true:suggestion
|
||||||
|
csharp_style_implicit_object_creation_when_type_is_apparent = true:suggestion
|
||||||
|
csharp_style_inlined_variable_declaration = true:suggestion
|
||||||
|
csharp_style_prefer_index_operator = true:suggestion
|
||||||
|
csharp_style_prefer_local_over_anonymous_function = true:suggestion
|
||||||
|
csharp_style_prefer_null_check_over_type_check = true:suggestion
|
||||||
|
csharp_style_prefer_range_operator = true:suggestion
|
||||||
|
csharp_style_prefer_tuple_swap = true:suggestion
|
||||||
|
csharp_style_prefer_utf8_string_literals = true:suggestion
|
||||||
|
csharp_style_throw_expression = true:suggestion
|
||||||
|
csharp_style_unused_value_assignment_preference = discard_variable:suggestion
|
||||||
|
csharp_style_unused_value_expression_statement_preference = discard_variable:silent
|
||||||
|
|
||||||
|
#### Using Directive Preferences ####
|
||||||
|
csharp_using_directive_placement = inside_namespace:warning
|
||||||
|
|
||||||
|
#### Formatting — New Line Preferences ####
|
||||||
|
csharp_new_line_before_catch = true
|
||||||
|
csharp_new_line_before_else = true
|
||||||
|
csharp_new_line_before_finally = true
|
||||||
|
csharp_new_line_before_members_in_anonymous_types = true
|
||||||
|
csharp_new_line_before_members_in_object_initializers = true
|
||||||
|
csharp_new_line_before_open_brace = all
|
||||||
|
csharp_new_line_between_query_expression_clauses = true
|
||||||
|
|
||||||
|
#### Formatting — Indentation Preferences ####
|
||||||
|
csharp_indent_block_contents = true
|
||||||
|
csharp_indent_braces = false
|
||||||
|
csharp_indent_case_contents = true
|
||||||
|
csharp_indent_case_contents_when_block = true
|
||||||
|
csharp_indent_labels = one_less_than_current
|
||||||
|
csharp_indent_switch_labels = true
|
||||||
|
|
||||||
|
#### Formatting — 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 = false
|
||||||
|
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
|
||||||
|
|
||||||
|
#### Formatting — Wrapping Preferences ####
|
||||||
|
csharp_preserve_single_line_blocks = true
|
||||||
|
csharp_preserve_single_line_statements = true
|
||||||
|
|
||||||
|
# ============================================================
|
||||||
|
# TEST PROJECTS — RELAXED RULES
|
||||||
|
# ============================================================
|
||||||
|
[*.Tests/**/*.cs]
|
||||||
|
dotnet_diagnostic.SA1600.severity = none
|
||||||
@@ -8,8 +8,8 @@
|
|||||||
|
|
||||||
## Table des modifications
|
## Table des modifications
|
||||||
|
|
||||||
| Date | Auteur |
|
| Date | Auteur |
|
||||||
|------|--------|
|
| ----- | ------------- |
|
||||||
| 25/03 | Clément Bobin |
|
| 25/03 | Clément Bobin |
|
||||||
|
|
||||||
---
|
---
|
||||||
@@ -18,12 +18,12 @@
|
|||||||
|
|
||||||
Avant de lancer l'application, assurez-vous d'avoir installé les outils suivants :
|
Avant de lancer l'application, assurez-vous d'avoir installé les outils suivants :
|
||||||
|
|
||||||
| Outil | Version minimale | Lien |
|
| Outil | Version minimale | Lien |
|
||||||
|-------|-----------------|------|
|
| -------------------------------------- | ---------------------------- | ------------------------------------- |
|
||||||
| .NET SDK | 10.0 | https://dotnet.microsoft.com/download |
|
| .NET SDK | 10.0 | https://dotnet.microsoft.com/download |
|
||||||
| Node.js (optionnel, pour outils front) | 18+ | https://nodejs.org |
|
| Node.js (optionnel, pour outils front) | 18+ | https://nodejs.org |
|
||||||
| Git | 2.x | https://git-scm.com |
|
| Git | 2.x | https://git-scm.com |
|
||||||
| Un IDE | Visual Studio 2022+ ou Rider | — |
|
| Un IDE | Visual Studio 2022+ ou Rider | — |
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -65,6 +65,7 @@ dotnet run
|
|||||||
```
|
```
|
||||||
|
|
||||||
L'application est accessible par défaut à :
|
L'application est accessible par défaut à :
|
||||||
|
|
||||||
- **HTTP :** http://localhost:5038
|
- **HTTP :** http://localhost:5038
|
||||||
- **HTTPS :** https://localhost:7095
|
- **HTTPS :** https://localhost:7095
|
||||||
|
|
||||||
@@ -89,10 +90,10 @@ Le fichier principal de configuration est `Webzine.WebApplication/appsettings.js
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
| Propriété | Type | Description | Valeur par défaut |
|
| Propriété | Type | Description | Valeur par défaut |
|
||||||
|-----------|------|-------------|-------------------|
|
| ------------------------- | ---- | -------------------------------------------------------------------------------- | ----------------- |
|
||||||
| `NombreDerniereChronique` | int | Nombre de chroniques affichées sur la page d'accueil (section "Derniers titres") | 3 |
|
| `NombreDerniereChronique` | int | Nombre de chroniques affichées sur la page d'accueil (section "Derniers titres") | 3 |
|
||||||
| `NombreDeTopTitres` | int | Nombre de titres affichés dans le bloc "Titres les plus populaires" | 3 |
|
| `NombreDeTopTitres` | int | Nombre de titres affichés dans le bloc "Titres les plus populaires" | 3 |
|
||||||
|
|
||||||
Ces valeurs sont injectées dans `AccueilController` via `IConfiguration` et peuvent être modifiées sans recompilation.
|
Ces valeurs sont injectées dans `AccueilController` via `IConfiguration` et peuvent être modifiées sans recompilation.
|
||||||
|
|
||||||
@@ -106,14 +107,15 @@ La configuration du logging se trouve dans `Webzine.WebApplication/nlog.config`.
|
|||||||
|
|
||||||
Les logs sont écrits dans le dossier `/Logs/` avec deux fichiers :
|
Les logs sont écrits dans le dossier `/Logs/` avec deux fichiers :
|
||||||
|
|
||||||
| Fichier | Contenu |
|
| Fichier | Contenu |
|
||||||
|---------|---------|
|
| --------------------- | ----------------------------------------------------- |
|
||||||
| `nlog-all-{date}.log` | Tous les logs (Debug et supérieur pour l'application) |
|
| `nlog-all-{date}.log` | Tous les logs (Debug et supérieur pour l'application) |
|
||||||
| `nlog-own-{date}.log` | Logs applicatifs avec URL de la requête |
|
| `nlog-own-{date}.log` | Logs applicatifs avec URL de la requête |
|
||||||
|
|
||||||
Les logs de la console sont également activés, utiles lors du développement.
|
Les logs de la console sont également activés, utiles lors du développement.
|
||||||
|
|
||||||
**Niveaux configurés :**
|
**Niveaux configurés :**
|
||||||
|
|
||||||
- `Webzine.WebApplication.*` → Debug et supérieur
|
- `Webzine.WebApplication.*` → Debug et supérieur
|
||||||
- `Microsoft.*` → Warning et supérieur (pour réduire le bruit)
|
- `Microsoft.*` → Warning et supérieur (pour réduire le bruit)
|
||||||
- `Microsoft.Hosting.Lifetime*` → Info (pour voir le démarrage de l'appli)
|
- `Microsoft.Hosting.Lifetime*` → Info (pour voir le démarrage de l'appli)
|
||||||
@@ -143,18 +145,18 @@ Les tests vérifient les contraintes de validation (annotations DataAnnotations)
|
|||||||
|
|
||||||
## 8. Routes principales
|
## 8. Routes principales
|
||||||
|
|
||||||
| URL | Contrôleur | Description |
|
| URL | Contrôleur | Description |
|
||||||
|-----|-----------|-------------|
|
| ----------------------------- | --------------------------- | ------------------------ |
|
||||||
| `/` | `AccueilController.Index` | Page d'accueil |
|
| `/` | `AccueilController.Index` | Page d'accueil |
|
||||||
| `/artiste/{nom}` | `ArtisteController.Index` | Page d'un artiste |
|
| `/artiste/{nom}` | `ArtisteController.Index` | Page d'un artiste |
|
||||||
| `/titre/{id}` | `TitreController.Details` | Détail d'un titre |
|
| `/titre/{id}` | `TitreController.Details` | Détail d'un titre |
|
||||||
| `/titre/style/{style}` | `TitreController.Style` | Titres par style |
|
| `/titre/style/{style}` | `TitreController.Style` | Titres par style |
|
||||||
| `/recherche` (POST) | `RechercheController.Index` | Résultats de recherche |
|
| `/recherche` (POST) | `RechercheController.Index` | Résultats de recherche |
|
||||||
| `/Administration/Dashboard` | `DashboardController.Index` | Tableau de bord admin |
|
| `/Administration/Dashboard` | `DashboardController.Index` | Tableau de bord admin |
|
||||||
| `/Administration/Artiste` | `ArtisteController` (admin) | Gestion des artistes |
|
| `/Administration/Artiste` | `ArtisteController` (admin) | Gestion des artistes |
|
||||||
| `/Administration/Titre` | `TitreController` (admin) | Gestion des titres |
|
| `/Administration/Titre` | `TitreController` (admin) | Gestion des titres |
|
||||||
| `/Administration/Style` | `StyleController` | Gestion des styles |
|
| `/Administration/Style` | `StyleController` | Gestion des styles |
|
||||||
| `/Administration/Commentaire` | `CommentaireController` | Gestion des commentaires |
|
| `/Administration/Commentaire` | `CommentaireController` | Gestion des commentaires |
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -168,4 +170,14 @@ En production, positionner :
|
|||||||
export ASPNETCORE_ENVIRONMENT=Production
|
export ASPNETCORE_ENVIRONMENT=Production
|
||||||
```
|
```
|
||||||
|
|
||||||
Cela désactive les pages d'erreur détaillées et active les optimisations de performance ASP.NET Core.
|
Cela désactive les pages d'erreur détaillées et active les optimisations de performance ASP.NET Core.
|
||||||
|
|
||||||
|
## Ajout du pre-commit
|
||||||
|
|
||||||
|
Les fichiers présents dans le dossier git_hooks sont à copier dans le dossier caché .git.
|
||||||
|
Le pre-commit reformatte le code à chaque commit.
|
||||||
|
Le commit-msg vérifie si le message du commit respecte bien les conventions du cahier des charges:
|
||||||
|
|
||||||
|
- le message référence un ticket
|
||||||
|
- le message termine par un point
|
||||||
|
- le message doit faire au moins 10 caractères
|
||||||
|
|||||||
@@ -2,9 +2,7 @@
|
|||||||
"$schema": "https://raw.githubusercontent.com/DotNetAnalyzers/StyleCopAnalyzers/master/StyleCop.Analyzers/StyleCop.Analyzers/Settings/stylecop.schema.json",
|
"$schema": "https://raw.githubusercontent.com/DotNetAnalyzers/StyleCopAnalyzers/master/StyleCop.Analyzers/StyleCop.Analyzers/Settings/stylecop.schema.json",
|
||||||
"settings": {
|
"settings": {
|
||||||
"documentationRules": {
|
"documentationRules": {
|
||||||
"documentInterfaces": false,
|
"documentationCulture": "fr-FR"
|
||||||
"documentInternalElements": false,
|
|
||||||
"documentExposedElements": false
|
|
||||||
},
|
},
|
||||||
"maintainabilityRules": {
|
"maintainabilityRules": {
|
||||||
"settings": {
|
"settings": {
|
||||||
|
|||||||
24
Webzine.Documentation/git_hooks/commit-msg
Normal file
24
Webzine.Documentation/git_hooks/commit-msg
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Hook: commit-msg
|
||||||
|
# Validates the commit message format.
|
||||||
|
# Git passes the path to the temp message file as $1.
|
||||||
|
|
||||||
|
COMMIT_MSG=$(cat "$1")
|
||||||
|
|
||||||
|
if [ ${#COMMIT_MSG} -le 10 ]; then
|
||||||
|
echo "❌ Erreur : Le message doit faire plus de 10 caractères."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! echo "$COMMIT_MSG" | grep -q "\.$"; then
|
||||||
|
echo "❌ Erreur : Le commit doit se terminer par un point."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! echo "$COMMIT_MSG" | grep -q "#[0-9]\+"; then
|
||||||
|
echo "❌ Erreur : Vous devez faire référence à un ticket (ex: #123)."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit 0
|
||||||
21
Webzine.Documentation/git_hooks/pre-commit
Normal file
21
Webzine.Documentation/git_hooks/pre-commit
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Hook: pre-commit
|
||||||
|
# Runs dotnet format on staged files, then verifies documentation warnings.
|
||||||
|
|
||||||
|
echo "🔧 Running dotnet format..."
|
||||||
|
dotnet format --severity warn
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "❌ Erreur : dotnet format a échoué."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
git add -u
|
||||||
|
|
||||||
|
echo "📄 Vérification de la documentation..."
|
||||||
|
dotnet format style --severity warn --verify-no-changes
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "❌ Erreur : Documentation manquante (classes/méthodes non commentées)."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit 0
|
||||||
2
Webzine.Entity.Tests/.editorconfig
Normal file
2
Webzine.Entity.Tests/.editorconfig
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
[*.cs]
|
||||||
|
dotnet_diagnostic.SA1600.severity = none
|
||||||
@@ -4,8 +4,6 @@
|
|||||||
|
|
||||||
namespace Webzine.Repository
|
namespace Webzine.Repository
|
||||||
{
|
{
|
||||||
using System.Data.Common;
|
|
||||||
|
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
|
namespace Webzine.Repository;
|
||||||
|
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
using Webzine.EntitiesContext;
|
using Webzine.EntitiesContext;
|
||||||
using Webzine.Entity;
|
using Webzine.Entity;
|
||||||
using Webzine.Repository.Contracts;
|
using Webzine.Repository.Contracts;
|
||||||
|
|
||||||
namespace Webzine.Repository;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Classe qui implémente le repository pour les styles en utilisant une base de données.
|
/// Classe qui implémente le repository pour les styles en utilisant une base de données.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
|
namespace Webzine.Repository;
|
||||||
|
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
using Webzine.EntitiesContext;
|
using Webzine.EntitiesContext;
|
||||||
using Webzine.Entity;
|
using Webzine.Entity;
|
||||||
using Webzine.Repository.Contracts;
|
using Webzine.Repository.Contracts;
|
||||||
|
|
||||||
namespace Webzine.Repository;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Classe qui implémente le repository pour les titres en utilisant une base de données.
|
/// Classe qui implémente le repository pour les titres en utilisant une base de données.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
|
namespace Webzine.Repository;
|
||||||
|
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
using Webzine.Entity;
|
using Webzine.Entity;
|
||||||
using Webzine.Repository.Contracts;
|
using Webzine.Repository.Contracts;
|
||||||
|
|
||||||
namespace Webzine.Repository;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Classe qui implémente le repository pour les styles en utilisant une liste locale comme source de données.
|
/// Classe qui implémente le repository pour les styles en utilisant une liste locale comme source de données.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
|
namespace Webzine.Repository;
|
||||||
|
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
using Webzine.Entity;
|
using Webzine.Entity;
|
||||||
using Webzine.Repository.Contracts;
|
using Webzine.Repository.Contracts;
|
||||||
|
|
||||||
namespace Webzine.Repository;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Classe qui implémente le repository pour les titres en utilisant une liste locale comme source de données.
|
/// Classe qui implémente le repository pour les titres en utilisant une liste locale comme source de données.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
using Microsoft.AspNetCore.Mvc;
|
namespace Webzine.WebApplication.Areas.Administration.Controllers;
|
||||||
|
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
|
||||||
using Webzine.Entity;
|
using Webzine.Entity;
|
||||||
using Webzine.Repository.Contracts;
|
using Webzine.Repository.Contracts;
|
||||||
using Webzine.WebApplication.Areas.Administration.ViewModels.Artiste;
|
using Webzine.WebApplication.Areas.Administration.ViewModels.Artiste;
|
||||||
|
|
||||||
namespace Webzine.WebApplication.Areas.Administration.Controllers;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Contrôleur pour la gestion des artistes dans l'administration du webzine.
|
/// Contrôleur pour la gestion des artistes dans l'administration du webzine.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
using System.Diagnostics;
|
namespace Webzine.WebApplication.Areas.Administration.Controllers;
|
||||||
|
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
|
||||||
using Webzine.Repository.Contracts;
|
using Webzine.Repository.Contracts;
|
||||||
using Webzine.WebApplication.Areas.Administration.ViewModels;
|
using Webzine.WebApplication.Areas.Administration.ViewModels;
|
||||||
|
|
||||||
namespace Webzine.WebApplication.Areas.Administration.Controllers;
|
|
||||||
|
|
||||||
[Area("Administration")]
|
[Area("Administration")]
|
||||||
public class DashboardController : Controller
|
public class DashboardController : Controller
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
|
namespace Webzine.WebApplication.Areas.Administration.Controllers;
|
||||||
|
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||||
|
|
||||||
using Webzine.Entity;
|
using Webzine.Entity;
|
||||||
using Webzine.Repository.Contracts;
|
using Webzine.Repository.Contracts;
|
||||||
using Webzine.WebApplication.Areas.Administration.ViewModels.Titre;
|
using Webzine.WebApplication.Areas.Administration.ViewModels.Titre;
|
||||||
|
|
||||||
namespace Webzine.WebApplication.Areas.Administration.Controllers;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Contrôleur pour la gestion des titres en administration. Ce contrôleur gère les opérations de création, modification, suppression et affichage des titres dans l'interface d'administration du webzine. Chaque action du contrôleur prépare un ViewModel spécifique pour la vue correspondante, permettant ainsi une séparation claire entre la logique métier et la présentation des données.
|
/// Contrôleur pour la gestion des titres en administration. Ce contrôleur gère les opérations de création, modification, suppression et affichage des titres dans l'interface d'administration du webzine. Chaque action du contrôleur prépare un ViewModel spécifique pour la vue correspondante, permettant ainsi une séparation claire entre la logique métier et la présentation des données.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
|
||||||
|
|
||||||
namespace Webzine.WebApplication.Areas.Administration.ViewModels.Titre;
|
namespace Webzine.WebApplication.Areas.Administration.ViewModels.Titre;
|
||||||
|
|
||||||
|
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// ViewModel pour la création et la modification d'un titre dans l'administration.
|
/// ViewModel pour la création et la modification d'un titre dans l'administration.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
using Microsoft.AspNetCore.Mvc;
|
|
||||||
|
|
||||||
namespace Webzine.WebApplication.Controllers;
|
namespace Webzine.WebApplication.Controllers;
|
||||||
|
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
|
||||||
public class ApiController : ControllerBase
|
public class ApiController : ControllerBase
|
||||||
{
|
{
|
||||||
private readonly ILogger<ApiController> logger;
|
private readonly ILogger<ApiController> logger;
|
||||||
|
|||||||
@@ -15,4 +15,4 @@ public static class RouteConfiguration
|
|||||||
name: "default",
|
name: "default",
|
||||||
pattern: "{controller=Accueil}/{action=Index}/{id?}");
|
pattern: "{controller=Accueil}/{action=Index}/{id?}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,3 +1,6 @@
|
|||||||
|
// L'erreur SA1200 (ordre des using directives) est desactivée pour Program.cs
|
||||||
|
#pragma warning disable SA1200
|
||||||
|
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
|
||||||
using NLog;
|
using NLog;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
using Webzine.WebApplication.ViewModels.Titre;
|
|
||||||
|
|
||||||
namespace Webzine.WebApplication.ViewModels.Recherche;
|
namespace Webzine.WebApplication.ViewModels.Recherche;
|
||||||
|
|
||||||
|
using Webzine.WebApplication.ViewModels.Titre;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// ViewModel pour afficher les resultats de recherche d'artistes et de titres.
|
/// ViewModel pour afficher les resultats de recherche d'artistes et de titres.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
using System.ComponentModel.DataAnnotations;
|
|
||||||
|
|
||||||
namespace Webzine.WebApplication.ViewModels.Titre;
|
namespace Webzine.WebApplication.ViewModels.Titre;
|
||||||
|
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Classe représentant un commentaire sur un titre, utilisée pour la validation des données lors de la soumission d'un commentaire.
|
/// Classe représentant un commentaire sur un titre, utilisée pour la validation des données lors de la soumission d'un commentaire.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
using Webzine.Entity;
|
|
||||||
|
|
||||||
namespace Webzine.WebApplication.ViewModels.Titre;
|
namespace Webzine.WebApplication.ViewModels.Titre;
|
||||||
|
|
||||||
|
using Webzine.Entity;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Contient les détails d'un titre, ainsi que les commentaires associés.
|
/// Contient les détails d'un titre, ainsi que les commentaires associés.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user