- Operating system: Windows 11
- Visual Studio version: 2022
- SonarLint plugin version: 7.7
- Programming language you’re coding in: C#
- Is connected mode used: SonarQube 10.4
I’ve migrated a solution with SonarLint configuration from V6 to V7. All project files have been updated, the folder .sonarlint
was cleared.
The configuration was moved to %AppData%\Roaming\SonarLint for Visual Studio\Bindings
as expected, it seems to be correct.
But, the rule configuration does not (fully) apply.
E.g. S1451 now reports every file in the editor (not as compiler warning).
The current header is:
// <copyright>
// Copyright (c) My Company GmbH. All rights reserved.
// </copyright>
The quickfix wants to change the header to
/*
* <Your-Product-Name>
* Copyright (c) <Year-From>-<Year-To> <Your-Company-Name>
*
* Please configure this header in your SonarCloud/SonarQube quality profile.
* You can also set it in SonarLint.xml additional file for SonarLint or standalone NuGet analyzer.
*/
The regular expression is correctly configured in c:\Users\***\AppData\Roaming\SonarLint for Visual Studio\Bindings\***\CSharp\SonarLint.xml
.
I’m wondering that there is no S1451 warning when the source gets compiled, while other Sonar warnings are present.
Interesting: The file SonarLint.xml
is mentioned to be used to configure the rule, while it was removed automatically by the plugin!?