Skip to content
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

SLCORE-988 allow clients to request which c# analyser to use #1123

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

sophio-japharidze-sonarsource
Copy link
Contributor

@sophio-japharidze-sonarsource sophio-japharidze-sonarsource commented Oct 18, 2024

@sophio-japharidze-sonarsource sophio-japharidze-sonarsource force-pushed the SLCORE-988_notify_which_csharp_analyzer_to_use branch 5 times, most recently from 8d7febb to c6807e7 Compare October 21, 2024 11:42
@sophio-japharidze-sonarsource sophio-japharidze-sonarsource marked this pull request as ready for review October 21, 2024 12:09
@sophio-japharidze-sonarsource sophio-japharidze-sonarsource force-pushed the SLCORE-988_notify_which_csharp_analyzer_to_use branch from 2bff000 to 2857579 Compare October 23, 2024 15:04
Copy link
Contributor

@damien-urruty-sonarsource damien-urruty-sonarsource left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A first round of comments, we can discuss tomorrow if needed

* Introduce a new method `org.sonarsource.sonarlint.core.rpc.protocol.backend.analysis.AnalysisRpcService.shouldUseEnterpriseCSharpAnalyzer` to allow clients to know what kind of C# analyzer should be used for the analysis
* The method returns a boolean value indicating whether the enterprise C# analyzer should be used or not
* The method returns `true` if a binding exists for config scope AND the related connected server has the enterprise C# plugin (`csharpenterprise`) installed
* The method returns `true` if binding exists with a SonarQube version < 10.8 (i.e. SQ versions that do not include repackaged dotnet analyzer) OR SonarCloud
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't it be false for this 2nd sentence? Also, what about standalone mode?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sentence seems correct to me. For SQ versions <10.8, the analyzer used to include ALL rules, including those that are moving to the enterprise analyzer now. So in order for users not to lose those rules, we will use enterprise analyzers.

Standalone will return false. I will update the doc.

@sophio-japharidze-sonarsource sophio-japharidze-sonarsource force-pushed the SLCORE-988_notify_which_csharp_analyzer_to_use branch 3 times, most recently from 93e56aa to a282442 Compare October 24, 2024 08:47
@sophio-japharidze-sonarsource sophio-japharidze-sonarsource force-pushed the SLCORE-988_notify_which_csharp_analyzer_to_use branch from a282442 to 0db9bab Compare October 24, 2024 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants