Sonar-dotnet: Rule S101: Types should be named in camel case

Created on 4 May 2017  路  4Comments  路  Source: SonarSource/sonar-dotnet

RSPEC-101

Shared naming conventions allow teams to collaborate efficiently. This rule checks whether or not type names are camel cased. To reduce noise, two consecutive upper case characters are allowed unless they form the whole type name. So, MyXClass is compliant, but XC on its own is not.

Most helpful comment

Hi @Evangelink,

Thank you for the quick reply.
I had these 2 solutions in mind. I was just hopping for the ability to add some exceptions to the rule somewhere globally, rather than doing it using pragma on each specific case.

Any plans to support this sort of functionality in the future.

Cheers

All 4 comments

Testing new script, disregard

Hello,

Thank you for the analyzer, really helpful.

Is there a way of adding exceptions to this rule?
For example, I would like that GMTService not fail this rule as "GMT" is a keyword which I want to ignore.

Thanks

Hi @mihaivader,

Thank you!
There is no such feature of exclusion list but depending on your usage, you can either:

  • if paired with SonarQube/SonarCloud mark the issue as False Positive or Won't Fix on the server side
  • if you are only using the analyzer, exclude the issue using a pragma

Cheers

Hi @Evangelink,

Thank you for the quick reply.
I had these 2 solutions in mind. I was just hopping for the ability to add some exceptions to the rule somewhere globally, rather than doing it using pragma on each specific case.

Any plans to support this sort of functionality in the future.

Cheers

Was this page helpful?
0 / 5 - 0 ratings