Skip to content

Commit

Permalink
Fix analyzers (#63)
Browse files Browse the repository at this point in the history
I'm trying a few changes to see if I can get the analyzers to behave
properly locally. For some reason, they get into a state where they
ignore the rules defined in the `.editorconfig` files entirely.
Something similar to
[this](dotnet/roslyn-analyzers#6281), but it
certainly isn't "fixed". Also, I believe there is a case where the node
reuse makes this even worse requiring me to kill all `dotnet` processes
in order for some settings changes to even take effect, so I'm
attempting the use of the `Directory.Build.rsp` file with the
`/NodeReuse:false` setting to see if it helps at all. I have a feeling
that there is a quirk between the nodes that VS starts up and the ones
that the CLI starts up.
  • Loading branch information
craigktreasure authored Sep 23, 2023
1 parent eb8feed commit 361dd17
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ StyleCopReport.xml
*.pgc
*.pgd
*.rsp
!Directory.Build.rsp
*.sbr
*.tlb
*.tli
Expand Down
2 changes: 2 additions & 0 deletions Directory.Build.rsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/MaxCPUCount
/NodeReuse:false
1 change: 0 additions & 1 deletion eng/DotNetAnalyzers.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
-->
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
<CodeAnalysisTreatWarningsAsErrors>true</CodeAnalysisTreatWarningsAsErrors>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<AnalysisLevel>7.0</AnalysisLevel>
</PropertyGroup>
Expand Down
4 changes: 2 additions & 2 deletions eng/DotNetDefaults.props
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
</PropertyGroup>

<PropertyGroup>
<MSBuildTreatWarningsAsErrors>$(IsCIBuild)</MSBuildTreatWarningsAsErrors>
<TreatWarningsAsErrors>$(IsCIBuild)</TreatWarningsAsErrors>
<MSBuildTreatWarningsAsErrors>true</MSBuildTreatWarningsAsErrors>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>

</Project>

0 comments on commit 361dd17

Please sign in to comment.