How to make SonarQube evaluate the nomenclature pattern?

Hey guys, we have been starting with SonarQube Community and running on a project developed in .Net Framework with C# and we have seen some great results so far.

In the past, I have worked in a project where the SonarQube (version 4) was configured to apply some Resharper and it was able to look at some good pratices related with nomenclature patterns. It means, a public method should be in CamelCase, a class name should be in CamelCase, a private attribute should be with lowerCamelCase and etc. I have seen on the documentation that Resharper was deprected but I am not sure if I can use it with the last versions of the SonarQube.

Is there any way (or extension) I can use to make SonarQube check the nomenclature patterns in C# and Javascript?

Thank you,

I am using:

  • SonarQube 7.5 Community Edition
  • SonarC# Plugin 7.10.0.7896
  • Scanner for MSBuild 4.5.0.1761-net46

Hi,

Search on the rules page in your instance for “naming convention”. You should find all the rules your heart desires.

 
:slight_smile:
Ann

1 Like

Hi @ganncamp :woman_technologist: :woman_teacher: haha

Thank you, I just found 7 rules for conventions on the sonarC# plugin, is there any way I can have more rules or create new ones? :smiley: My heart will love it! haha

Hi,

You could write a Roslyn check: https://docs.sonarqube.org/pages/viewpage.action?pageId=11640944

 
Ann