-
Notifications
You must be signed in to change notification settings - Fork 2
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
SLOMNI-25 Use path to analyzer JAR provided through analyzer property #241
Conversation
4cc3c0d
to
176c076
Compare
@@ -79,6 +79,7 @@ public void execute(SensorContext context) { | |||
return; | |||
} | |||
try { | |||
Path analyzerPluginPath = context.config().get(CSharpPropertyDefinitions.getEnterpriseAnalyzerPath()).map(Paths::get).orElse(null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can check the additional analyzer property value (sonar.omnisharp.internal.shouldUseEnterprise or similar) and decide which analyzer plugin path to use - OSS or enterprise
var analyzerPluginPath = configuration.get(CSharpPropertyDefinitions.getEnterpriseAnalyzerPath()).orElse(null); | ||
try (InputStream analyzerPlugin = new FileInputStream(analyzerPluginPath)) { | ||
requireNonNull(analyzerPlugin, "Plugin jar not found"); | ||
ZipUtils.unzip(analyzerPlugin, pluginUnzipDir, ze -> ze.getName().endsWith(".zip") || ze.getName().endsWith(".json") || ze.getName().endsWith(".html")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to filter the components anymore, analyzer should do it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this filtering still needed?
c5f688b
to
548cc65
Compare
f6ec1a3
to
51f6b98
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just left one question about filtering while unzipping
Quality Gate passed for 'sonarlint-omnisharp-dotnet'Issues Measures |
Quality Gate passed for 'SonarOmnisharp Parent'Issues Measures |
SLOMNI-25