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
| # 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 | |
| dotnet_analyzer_diagnostic.category-StyleCop.CSharp.LayoutRules.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 |
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] | |
| ## | |
| ## JetBrains ReSharper InspectCode | |
| ## | |
| # All rules here https://www.jetbrains.com/help/resharper/Reference__Code_Inspections_CSHARP.html | |
| # Method invocation is skipped | |
| resharper_invocation_is_skipped_highlighting = 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
| [*.cs] | |
| ## | |
| ## StyleCop.Analyzers | |
| ## | |
| # All rules here https://github.com/DotNetAnalyzers/StyleCopAnalyzers/tree/master/documentation | |
| # A violation of this rule occurs when a compilation (project) contains one or more files which are parsed with the DocumentationMode set to None. This most frequently occurs when the project is configured to not produce an XML documentation file during the build. | |
| # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA0001.md | |
| dotnet_diagnostic.SA0001.severity = none |