This file contains hidden or 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
| [*] | |
| ## | |
| ## JetBrains ReSharper InspectCode | |
| ## | |
| # All rules here https://www.jetbrains.com/help/resharper/Reference__Code_Inspections_CSHARP.html | |
| # + - good | |
| # - - bad | |
| # d - duplicate |
This file contains hidden or 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
| <Project> | |
| <PropertyGroup> | |
| <EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild> | |
| <GenerateDocumentationFile>true</GenerateDocumentationFile> | |
| <TreatWarningsAsErrors>true</TreatWarningsAsErrors> | |
| <WarningsNotAsErrors>NU1901,NU1902,NU1903,NU1904</WarningsNotAsErrors> | |
| </PropertyGroup> | |
| <ItemGroup> | |
| <PackageReference Include="Roslynator.Formatting.Analyzers" Version="4.15.0"> |
This file contains hidden or 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
| [*.cs] | |
| ## | |
| ## Roslynator | |
| ## | |
| # All rules here https://josefpihrt.github.io/docs/roslynator/configuration | |
| # Disable all rules | |
| dotnet_analyzer_diagnostic.category-roslynator.severity = none | |
| # Row length limits |
This file contains hidden or 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
| [*.cs] | |
| # https://gist.github.com/kurnakovv/70a5d76dc5f3eb9ef114b182283cb407 | |
| ## | |
| ## StyleCop.Analyzers | |
| ## | |
| # All rules here https://github.com/DotNetAnalyzers/StyleCopAnalyzers/tree/master/documentation | |
| # Disable all rules | |
| dotnet_analyzer_diagnostic.category-StyleCop.CSharp.AlternativeRules.severity = none | |
| dotnet_analyzer_diagnostic.category-StyleCop.CSharp.DocumentationRules.severity = none |
This file contains hidden or 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
| $baseBranch = "main" # or "master" | |
| $currentBranch = git rev-parse --abbrev-ref HEAD | |
| # Get changed file names in current branch | |
| $files = git diff --name-only $baseBranch | |
| # Delete useless spaces | |
| $files = $files | Where-Object { $_ -ne "" } | |
| if ($files.Count -eq 0) { |
This file contains hidden or 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
| # Get git current changes (file names) | |
| $files = git status --porcelain | ForEach-Object { | |
| $_.Substring(3) | |
| } | |
| if ($files.Count -eq 0) { | |
| Write-Host "No diff" | |
| exit | |
| } |
This file contains hidden or 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
| ## | |
| ## IDisposableAnalyzers rules | |
| ## | |
| # All rules here https://github.com/DotNetAnalyzers/IDisposableAnalyzers | |
| dotnet_diagnostic.IDISP001.severity = suggestion # Dispose created | |
| dotnet_diagnostic.IDISP002.severity = suggestion # Dispose member | |
| dotnet_diagnostic.IDISP003.severity = suggestion # Dispose previous before re-assigning | |
| dotnet_diagnostic.IDISP004.severity = suggestion # Don't ignore created IDisposable | |
| dotnet_diagnostic.IDISP005.severity = suggestion # Return type should indicate that the value should be disposed |
This file contains hidden or 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
| [*.cs] | |
| ## | |
| ## Code analysis (CAxxxx) rules | |
| ## | |
| # All rules here https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/categories | |
| ### Design rules ### | |
| # ✅ Good |
This file contains hidden or 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
| [*.cs] | |
| ## | |
| ## Code-style (IDExxxx) rules | |
| ## | |
| # All rules here https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules | |
| dotnet_analyzer_diagnostic.category-Style.severity = error | |
| dotnet_analyzer_diagnostic.category-CodeQuality.severity = error |
This file contains hidden or 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
| [*.cs] | |
| ## | |
| ## NullReferenceException (NRE) or nullable | |
| ## | |
| # All rules here https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-messages/nullable-warnings | |
| # Thrown value may be null. | |
| dotnet_diagnostic.CS8597.severity = error |
NewerOlder