Using Sonar for C++ naming conventions

Hello, @dbeker, and welcome to the community,

There are rules for naming conventions, although they are disabled by default.
For instance, S100 for functions, and there are others.

In SonarCloud, you must create a new Quality Profile for your organization (if you do not have one already).

  1. Go to your organization page (https://sonarcloud.io/organizations/...)
  2. Click on “Quality Profiles”
  3. Search for C++; there should be two built-in. You can pick any of the two as a base profile (I would advise Sonar Way by default).
  4. Click the three dots to the right and then “Extend.”
  5. Give it a new name
  6. Click on “Inactive rules.”
  7. Search for, say, S100, click on “Activate,” and provide a regex used to verify the naming convention

Once this is done, you can either set this new profile as the organization’s default or go to the affected projects and apply the new profile.

SonarLint will pick these changes if you use connected mode.

Please let me know if this helps.

Also, the changes take effect on new analyses, so you will not immediately see any issue raised in SC after activating the rules.