dotnet / dotnet/docs

Revise `AnalysisLevel` note for correctness

Open
#29,054 2 comments 0 reactions 0 assignees View on GitHub
dotnet-fundamentals/svc
Dominant language
No language data
Stars
4.8k
Forks
6.1k
Avg merge
19h 10m
Merged PRs (30d)
268

Description

https://github.com/dotnet/sdk/blob/7347d27e2fc7a25de75e00083d379660dca87689/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.Analyzers.targets#L18-L27

It looks like, for .NET 5, the default value is 5.0, but for any newer version, the default is latest.

The documentation says:

> The default value for the AnalysisLevel property is latest, which means you always get the latest code analysis rules as you move to newer versions of the .NET SDK.

which seems to apply only for .NET 6 and greater.

@mavasani Can you confirm?

---
#### Document Details

⚠ *Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.*

* ID: f8906b2c-b984-0427-d064-829e7ea2fc55
* Version Independent ID: 128f9903-971d-6a66-a2cb-9b12acbc55e7
* Content: [Code analysis in .NET](https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/overview)
* Content Source: [docs/fundamentals/code-analysis/overview.md](https://github.com/dotnet/docs/blob/main/docs/fundamentals/code-analysis/overview.md)
* Product: **dotnet-fundamentals**
* GitHub Login: @gewarren
* Microsoft Alias: **gewarren**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.