Skip to content

Commit

Permalink
Remove CSharpGuidelinesAnalyzer and associated editorconfig values
Browse files Browse the repository at this point in the history
Fixes #139
  • Loading branch information
rjmurillo committed Jul 6, 2024
1 parent d5fe1a2 commit a4ae63e
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 23 deletions.
17 changes: 0 additions & 17 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -388,34 +388,17 @@ dotnet_naming_style.s_camelcase.required_suffix =
dotnet_naming_style.s_camelcase.word_separator =
dotnet_naming_style.s_camelcase.capitalization = camel_case

# AV1580: Method argument calls a nested method
# Because debugger breakpoints cannot be set inside expressions, avoid overuse of nested method calls.
# Example: string result = ConvertToXml(ApplyTransforms(ExecuteQuery(GetConfigurationSettings(source))));
# requires extra steps to inspect intermediate method return values. On the other hard, were this expression broken into intermediate variables, setting a breakpoint on one of them would be sufficient.
#
# This is moved to silent because it's flagging foo.AsSpan()
dotnet_diagnostic.AV1580.severity = silent

# MA0040: Forward the CancellationToken parameter to methods that take one
dotnet_diagnostic.MA0040.severity = error
# Async analyzer
dotnet_diagnostic.CA2016.severity = error

# AV1555: Avoid using named arguments
# Disabled because it's common to use a named argument when passing `null` or bool arguments to make the parameter's purpose clear
dotnet_diagnostic.AV1555.severity = none

# AV1500: Methods should not exceed 7 statements
dotnet_diagnostic.AV1500.severity = silent

#### Handling TODOs ####
# This is a popular rule in analyzers. Everyone has an opinion and
# some of the severity levels conflict. We don't need all of these
# to fire, only one. Pick one and mark it as informational so we
# don't lose track.
# S1135: Track uses of "TODO" tags
dotnet_diagnostic.S1135.severity = suggestion
# AV2318: Work-tracking TODO comment should be removed
dotnet_diagnostic.AV2318.severity = none
# MA0026: Fix TODO comment
dotnet_diagnostic.MA0026.severity = none
4 changes: 0 additions & 4 deletions build/targets/codeanalysis/CodeAnalysis.props
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="CSharpGuidelinesAnalyzer">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="ExhaustiveMatching.Analyzer" />
</ItemGroup>
</Project>
3 changes: 1 addition & 2 deletions build/targets/codeanalysis/Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
<PackageVersion Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.4" />
<PackageVersion Include="Roslynator.Analyzers" Version="4.12.4" />
<PackageVersion Include="StyleCop.Analyzers" Version="1.2.0-beta.556" />
<PackageVersion Include="SonarAnalyzer.CSharp" Version="9.28.0.94264" />
<PackageVersion Include="CSharpGuidelinesAnalyzer" Version="3.8.5" />
<PackageVersion Include="SonarAnalyzer.CSharp" Version="9.28.0.94264" />
<PackageVersion Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.10.48" />
<PackageVersion Include="ExhaustiveMatching.Analyzer" Version="0.5.0" />
</ItemGroup>
Expand Down

0 comments on commit a4ae63e

Please sign in to comment.