-
Notifications
You must be signed in to change notification settings - Fork 362
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feedback needed: Solve c plugin, c++ plugin, CFamily plugin issues #1784
Comments
Hi @guwirth , If you look at SonarCFamily plugin, it uses a single plugin (key=cpp) for C, C++ and Objective-C languages. Sonar-cxx could match to this by using a single plugin with a unique key (key=cxx).
For the rule repositories of all plugins (common-c++, valgrind, …), Sonar-cxx could use the same languages as the sonarCFamily plugin (language keys c and cpp, instead of key c++). This would allow sharing the same languages and enabling combining both plugins That's for example how some java plugins seem to be integrated.
Problem is that only one plugin can create a given language. Easiest would be to let SonarCFamily create them but what happens if SonarCfamily plugin is not available on the SQ instance and sonar-cxx is used as a standalone plugin. I hope the explanations are clear and of any help for you. |
Could you explain a bit more how to use the current workaround for 2? At the moment it seems that if you assign *.cpp etc to the commercial plugin then the community one isn't even picked up by sonar-scanner (so reports from pc-lint, clang-tidy etc don't get in), and if you assign *.cpp to the community plugin you can't use the commercial plugin's analysis and rules. |
Hi @nathanaelg, The point is that everything need an unique id.
That means scanning a .cpp file with SonarCFamily (language key=cpp) result in another language than scanning it with cxx plugin (language key=c++). At the moment the repositories are also assigned unambiguous to one language. This is why you can't scan a file with the SonarCFamily sensor and assign issues from a cxx sensor. Regards, |
imo opinion i dont think we should try to make the cxx and cfamiliy running at the same time. somehow, by braking language keys etc.. imo what people require is the external sensors only, since the gramar (are cxx checks are gone anyway) and metrics is handled by the sonarsource plugin. So if we just create a new plugin that ships the external sensors (no language or grammar or metrics) and attaches the rules to the sonarsource plugin i think its enough. To reduce the complexity of this setup, rules repositories could even be dropped and issues feeded into sonar via the custom issues plugin introduced in new version sonar. |
I tend to agree with @jmecosta - I haven't tried the commercial plugin enough to know whether it covers everything in the core community plugin but it does tend to be the external sensors that I'd want to use alongside the commercial plugin. |
PR #2018 is solving this issue:
V2.0: This is the simplest solution. Depending on whether "more" is needed, we can add this again in later versions. |
Hi,
I need your input to decide how to proceed with current c plugin, c++ plugin, SonarCFamily plugin issues.
Issue 1: c plugin is not working in parallel to SonarCFamily plugin because same language key is used.
I see different solutions:
Issue 2: cxx community plugin sensors cannot be used for commercial SonarCFamily.
I see different solutions:
The two issues have an impact on each other.
Any other ideas / hints?
Regards,
The text was updated successfully, but these errors were encountered: