sonar-dotnet
sonar-dotnet copied to clipboard
S101: Configuration for custom acronyms
Description
On our project we have some three and four letter acronyms, that are part of a specification. These acronyms are used in code, but they will trigger S101. Would it be possible to add a file to the project that describe what acronyms are allowed, or should be written, for example in a similar way as the CustomDictionary.xml file that is used by CA1709
Repro steps
Create a class with the name NSAInformer
Expected behavior
Warning S101 is not given for NSAInformer, because NSA is the established capitalized 3 letter acronym in our specification.
Actual behavior
Warning S101 is given NSAInfomer, telling me that it should be NsaInformer
Known workarounds
Suppress S101 in all cases where the NSA acronym is used
Related information
- SonarAnalyzer.CSharp version 7.14.0.8411
- Visual Studio Version 2019 (16.1.1)
related to #320 - relax the restrictions
RSPEC-101
SonarWay Default Severity:Minor Impact:Low Likelihood:Low
Is there an ETA for this? It seems like a basic feature that comes out-of-the-box with Visual Studio and Resharper. We ended up ignoring all S101 errors because of this lack of configuration to allow for custom known acronyms.
Yeah, this one feels annoying. Ideally it should take the resharper .DotSettings and the VS equivalent to ignore certain abbreviations. Alternatively use your own dictionary, that could be generated then from existing files by the community. As it stands now, we will also just ignore S101 :(
@andrei-epure-sonarsource any updates? :)
@andrei-epure-sonarsource Hello, any updates? It would be great to have something like this. Otherwise we start to ignore S101 as well. And I'm really not in favor with this approach.