Connected to SonarCloud or SonarQube (and which version): none
And a thorough description of the problem / question:
Hello! I need to be able to see all the instances in which the rule S1244 is triggered.
I cannot find help online for C# and i tried all the possible configurations in the settings.json:
So if I understand you correctly, you are wondering why, in SonarLint standalone mode, you do not see S1244 being raised while you do see other errors, am I right?
If that is the case, it is probably because S1244 is not activated by default.
You can activate it
using a ruleset (legacy option, the only one available for VS pre-2019)
using a .EditorConfig file (available in VS 2019 and later)
For the EditorConfig, you can create such a file from VS using the menu on your project (if you do not already have one), and you can add the following inside:
[*.cs]
dotnet_diagnostic.S1244.severity = error
That file can be added to the repo to share the rules amongst contributors if you are not using connected mode.
You can refer to the SonarLint documentation for more information about that.
I hope this actually answers your question. If it does not, please feel free to correct me and I’ll try to help.
You can simply add one file at the root of the repo (next to the solution) and it will be picked up by VS for all projects.
If you want specific settings on top of those per-project, you can simply add an editorconfig file in the project and set only the flags you need and they will overwrite the ones from the top-level file.
As far as I can see, you should specify root = true in the top-level file.