Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -314,3 +314,4 @@ $RECYCLE.BIN/

# Visual Studio local development settings
launchSettings.json
.objs/
4 changes: 2 additions & 2 deletions build/NI.CSharp.Analyzers.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<!--TODO: author and owner may have to change if we go to nuget.org -->
<authors>NI</authors>
<owners>NI</owners>
<copyright>Copyright 2025 National Instruments Corporation</copyright>
<copyright>Copyright 2024 National Instruments Corporation</copyright>
<description>NI's code analyzers and rulesets for C# projects.</description>
<summary>NI's code analyzers and rulesets for C# projects.</summary>
<developmentDependency>true</developmentDependency>
Expand All @@ -22,7 +22,7 @@
major version, make sure to update AnalysisLevel in NI.CSharp.Analysers.props
too, otherwise new rules will not be properly enabled.
-->
<dependency id="Microsoft.CodeAnalysis.NetAnalyzers" version="10.0.100" />
<dependency id="Microsoft.CodeAnalysis.NetAnalyzers" version="9.0.0" />
<dependency id="Microsoft.CodeAnalysis.CSharp" version="4.2.0" />
<dependency id="Microsoft.CodeAnalysis.Analyzers" version="3.3.3" />
<dependency id="Microsoft.VisualStudio.Threading.Analyzers" version="17.10.48" />
Expand Down
3 changes: 0 additions & 3 deletions nuget.config
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,5 @@
<add key="automatic" value="True" />
</packageRestore>
<packageSources>
<!-- `clear` ensures no additional sources are inherited from another config file. -->
<clear />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
</packageSources>
</configuration>
8 changes: 4 additions & 4 deletions src/AnalyzerConfiguration/NI.CSharp.Analyzers.props
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@
<AnalysisMode Condition="'$(AnalysisMode)' == ''">NI</AnalysisMode>

<!--
If AnalysisLevel is not set, the .NET SDK will default to the version of the SDK. If the SDK is less than .NET 10,
then despite having a .NET 10 analyzer nuget referenced, we will use the lower SDK version as the analysis level.
If AnalysisLevel is not set, the .NET SDK will default to the version of the SDK. If the SDK is less than .NET 9,
then despite having a .NET 9 analyzer nuget referenced, we will use the lower SDK version as the analysis level.

Thus we manually set the default analysis level to 10.0 to make sure .NET 10 warnings are still checked.
Thus we manually set the default analysis level to 9.0 to make sure .NET 9 warnings are still checked.
-->
<AnalysisLevel Condition="'$(AnalysisLevel)' == ''">10.0</AnalysisLevel>
<AnalysisLevel Condition="'$(AnalysisLevel)' == ''">9.0</AnalysisLevel>
</PropertyGroup>

<!--
Expand Down
2 changes: 1 addition & 1 deletion src/AnalyzerConfiguration/NI.CSharp.Analyzers.targets
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
<Analyzer Include="$(PkgStyleCop_Analyzers_Unstable)\analyzers\dotnet\cs\StyleCop.Analyzers.CodeFixes.dll"/>

<!-- Microsoft's CA analyzers -->
<Analyzer Include="$(PkgMicrosoft_CodeAnalysis_NetAnalyzers)\analyzers\dotnet\Microsoft.CodeAnalysis.NetAnalyzers.dll"/>
<Analyzer Include="$(PkgMicrosoft_CodeAnalysis_NetAnalyzers)\analyzers\dotnet\cs\Microsoft.CodeAnalysis.NetAnalyzers.dll"/>
<Analyzer Include="$(PkgMicrosoft_CodeAnalysis_NetAnalyzers)\analyzers\dotnet\cs\Microsoft.CodeAnalysis.CSharp.NetAnalyzers.dll"/>
<Analyzer Include="$(PkgMicrosoft_VisualStudio_Threading_Analyzers)\analyzers\cs\Microsoft.VisualStudio.Threading.Analyzers.dll"/>

Expand Down