- ALM used: Azure DevOps
- CI system used: Azure DevOps
- Scanner command used: Azure DevOps plugin, msbuild-integrated
- Languages of the repository: C#, HTML, JS, CSS
- Error observed: S6853: A form label must be associated with a control.
- Steps to reproduce:
<label asp-for="Year"></label>
- Disable rule S6853
This is another false positive for .NET MVC projects, and a really obvious one. I appreciate the attempt at getting better scan results for HTML files and MVC views, but please, please add at least a simple, run-off-the-mill MVC project to your test suite. This is not the first time that I’m suddenly getting a few hundred SonarQube errors on an MVC project that hasn’t changed, and all of them being a new rule that’s spewing out false positives because SonarQube interprets MVC View code as HTML.