dotnet / dotnet/project-system
Code Analysis project property page improvements
- Dominant language
- C#
- Stars
- 1k
- Forks
- 415
- PR merge metrics
- No merged PRs in 30d
Description
#7538 added a Code Analysis page to the new Project Properties. There are some improvements which could not be included in time for 17.0, which are tracked here:
- [ ] Consider the `RunAnalyzers` property somehow. It overrides both `RunAnalyzersDuringBuild` and `RunAnalyzersDuringLiveAnalysis`. If `RunAnalyzers` is set in the project (to either true or false) then attempting to check or uncheck other check boxes will have no effect. Possible fixes for this:
- Intercept writes to `RunAnalyzersDuringBuild` and `RunAnalyzersDuringLiveAnalysis` and clear any value of `RunAnalyzers`.
- Hide the `RunAnalyzersDuringBuild` and `RunAnalyzersDuringLiveAnalysis` properties when `RunAnalyzers` has a non-empty value.
- Introduce a combo-box with options _Never run_, _On build only_, _Live analysis only_, _Build and live analysis_.
- Possibly something else.
- [ ] If the project targets .NET Framework (e.g. `net48`) then the _Analysis level_ combo box appears empty. Should it be defaulted to _None_? The [docs](https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#analysislevel) are unclear on this point.
- [ ] Consider support for `` ([docs](https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#analysismode))
- [ ] Consider support for `` ([docs](https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/overview#treat-warnings-as-errors)).
- [ ] Move the XAML for these properties to the Roslyn repo
cc @jmarolf
Contributor guide
Assessment
This issue has not been assessed yet.