-
Notifications
You must be signed in to change notification settings - Fork 210
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce static code analysis in chapter two
Introduce static code analysis in chapter two
- Loading branch information
Showing
111 changed files
with
710 additions
and
572 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
...-separation/Docs/ArchitectureDecisionLog/0011-turn-on-static-code-analysis.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
= 11. Turn on static code analysis | ||
|
||
Date: 2023-09-04 | ||
|
||
== Problem | ||
|
||
We have been experiencing an increasing number of bugs and code quality issues in our project. Manual code reviews are time-consuming and error-prone, and we need a more systematic approach to catch these issues early in the development process. | ||
|
||
== Decision | ||
|
||
After careful consideration, we have decided to turn on static code analysis for all our software projects. We will leverage automated tools and integrate them into our continuous integration (CI) pipeline to analyze code for potential issues, adherence to coding standards, and security vulnerabilities. | ||
|
||
== Consequences | ||
|
||
- Static code analysis will help us catch code quality issues, bugs, and security vulnerabilities at an early stage of development, reducing the likelihood of these issues reaching production | ||
- The tools will enforce coding standards and best practices across all projects, leading to more consistent and maintainable code | ||
- Developers can focus more on writing code, as the analysis tools will automatically identify issues, reducing the need for manual code reviews | ||
- Over time, the quality of our codebase is expected to improve, leading to fewer defects and maintenance challenges | ||
- Identifying and addressing security vulnerabilities early in the development process will enhance the security of our software | ||
- There may be a learning curve for some team members as they become accustomed to using static code analysis tools. We will provide training and resources to help them adapt | ||
- Configuring and integrating static code analysis tools into our CI pipeline may require some initial effort, but this investment is expected to pay off in the long run |
2 changes: 1 addition & 1 deletion
2
...tecture-approach-to-contracts-module.adoc → ...tecture-approach-to-contracts-module.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ng-layered-approach-to-passes-module.adoc → ...ng-layered-approach-to-passes-module.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...g/0013-use-shared-integration-events.adoc → ...g/0014-use-shared-integration-events.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
= 13: Use shared integration events | ||
= 14. Use shared integration events | ||
|
||
Date: 2023-05-24 | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
...query-separation-to-contracts-module.adoc → ...query-separation-to-contracts-module.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...e-flags-to-isolate-integration-tests.adoc → ...e-flags-to-isolate-integration-tests.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...of-microsoft-feature-management-tool.adoc → ...of-microsoft-feature-management-tool.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,137 @@ | ||
############################### | ||
# Core EditorConfig Options # | ||
############################### | ||
root = true | ||
# All files | ||
[*] | ||
indent_style = space | ||
|
||
# XML project files | ||
[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj}] | ||
indent_size = 2 | ||
|
||
# XML config files | ||
[*.{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct}] | ||
indent_size = 2 | ||
|
||
# Code files | ||
[*.{cs,csx,vb,vbx}] | ||
indent_size = 4 | ||
insert_final_newline = true | ||
charset = utf-8-bom | ||
|
||
dotnet_analyzer_diagnostic.severity = error | ||
dotnet_diagnostic.CS1591.severity = none | ||
|
||
############################### | ||
# .NET Coding Conventions # | ||
############################### | ||
[*.{cs,vb}] | ||
# Organize usings | ||
dotnet_sort_system_directives_first = true | ||
# this. preferences | ||
dotnet_style_qualification_for_field = false | ||
dotnet_style_qualification_for_property = false | ||
dotnet_style_qualification_for_method = false | ||
dotnet_style_qualification_for_event = false | ||
# Language keywords vs BCL types preferences | ||
dotnet_style_predefined_type_for_locals_parameters_members = true | ||
dotnet_style_predefined_type_for_member_access = true | ||
# Parentheses preferences | ||
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity | ||
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity | ||
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity | ||
dotnet_style_parentheses_in_other_operators = always_for_clarity | ||
# Modifier preferences | ||
dotnet_style_require_accessibility_modifiers = for_non_interface_members | ||
dotnet_style_readonly_field = true | ||
# Expression-level preferences | ||
dotnet_style_object_initializer = true | ||
dotnet_style_collection_initializer = true | ||
dotnet_style_explicit_tuple_names = true | ||
dotnet_style_null_propagation = true | ||
dotnet_style_coalesce_expression = true | ||
dotnet_style_prefer_is_null_check_over_reference_equality_method = true | ||
dotnet_style_prefer_inferred_tuple_names = true | ||
dotnet_style_prefer_inferred_anonymous_type_member_names = true | ||
dotnet_style_prefer_auto_properties = true | ||
dotnet_style_prefer_conditional_expression_over_assignment = true | ||
dotnet_style_prefer_conditional_expression_over_return = true | ||
############################### | ||
# Naming Conventions # | ||
############################### | ||
# Style Definitions | ||
dotnet_naming_style.pascal_case_style.capitalization = pascal_case | ||
# Use PascalCase for constant fields | ||
dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = error | ||
dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields | ||
dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style | ||
dotnet_naming_symbols.constant_fields.applicable_kinds = field | ||
dotnet_naming_symbols.constant_fields.applicable_accessibilities = * | ||
dotnet_naming_symbols.constant_fields.required_modifiers = const | ||
############################### | ||
# C# Coding Conventions # | ||
############################### | ||
[*.cs] | ||
# var preferences | ||
csharp_style_var_for_built_in_types = true | ||
csharp_style_var_when_type_is_apparent = true | ||
csharp_style_var_elsewhere = true | ||
# Expression-bodied members | ||
csharp_style_expression_bodied_methods = true | ||
csharp_style_expression_bodied_constructors = true | ||
csharp_style_expression_bodied_operators = true | ||
csharp_style_expression_bodied_properties = true | ||
csharp_style_expression_bodied_indexers = true | ||
csharp_style_expression_bodied_accessors = true | ||
# Pattern matching preferences | ||
csharp_style_pattern_matching_over_is_with_cast_check = true | ||
csharp_style_pattern_matching_over_as_with_null_check = true | ||
# Null-checking preferences | ||
csharp_style_throw_expression = true | ||
csharp_style_conditional_delegate_call = true | ||
# Modifier preferences | ||
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async | ||
# Expression-level preferences | ||
csharp_prefer_braces = true | ||
csharp_style_deconstructed_variable_declaration = true | ||
csharp_prefer_simple_default_expression = true | ||
csharp_style_prefer_local_over_anonymous_function = true | ||
csharp_style_inlined_variable_declaration = true | ||
# Other | ||
csharp_style_unused_value_expression_statement_preference = discard_variable:none | ||
csharp_style_namespace_declarations = file_scoped | ||
csharp_using_directive_placement = inside_namespace | ||
dotnet_style_namespace_match_folder = false | ||
dotnet_code_quality.ca1711.allowed_suffixes = EventHandler | ||
dotnet_code_quality.CA1716.analyzed_symbol_kinds = Event | ||
############################### | ||
# C# Formatting Rules # | ||
############################### | ||
# 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_between_query_expression_clauses = true | ||
# Indentation preferences | ||
csharp_indent_case_contents = true | ||
csharp_indent_switch_labels = true | ||
csharp_indent_labels = flush_left | ||
# Space preferences | ||
csharp_space_after_cast = false | ||
csharp_space_after_keywords_in_control_flow_statements = true | ||
csharp_space_between_method_call_parameter_list_parentheses = false | ||
csharp_space_between_method_declaration_parameter_list_parentheses = false | ||
csharp_space_between_parentheses = false | ||
csharp_space_before_colon_in_inheritance_clause = true | ||
csharp_space_after_colon_in_inheritance_clause = true | ||
csharp_space_around_binary_operators = before_and_after | ||
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false | ||
csharp_space_between_method_call_name_and_opening_parenthesis = false | ||
csharp_space_between_method_call_empty_parameter_list_parentheses = false | ||
# Wrapping preferences | ||
csharp_preserve_single_line_statements = true | ||
csharp_preserve_single_line_blocks = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.