Regural expressions in rules don't support non-ascii-characters

  • SonarQube 7.9.1.27448
  • Scanner sonar-scanner-msbuild-4.6.2.2108-net46

Regural expressions in rules don’t support non-ascii-characters.

I changed some of the naming rules in VB.NET- and Javascript-rules but the changes don’t seem to work.

When modifying rules regexis text looks to be fine. My functions naming convetion regex is “^([A-ZåäöÅÄÖ]{1,3}[a-z0-9åäöÅÄÖ]+)*([A-ZåäöÅÄÖ]{2})?$” and is displayed as that when modifying the rules-regex. I’d attach a picture here, but I’m only allowed to attach one image.

But in issues the regex is garbled and doesn’t yield expected results.

hello @juho,

sorry that we missed this post. Can you confirm that you are still facing the issue? Do you have issue on VB or JavaScript code?

Yes, we still have this same issue. We haven’t updated though, so we’re still at version 7.9.1.27448.

There’s the same issue with Javascript and with VB.NET. And I suspect that with other rules also but C# doesn’t have similar naming convention rules implemented, I think.

Hi @juho,

I can reproduce your issue with SQ 8.5 and Scanner for MSBuild. We need to fix this on our side, but that will take some time.

Possible workaround for VB.NET:

  • Run the Scanner begin step.
  • Locate \.sonarqube\conf\vbnet\SonarLint.xml in your project
  • Replace the malformed string with a correct one
  • Run build as usually