-
Notifications
You must be signed in to change notification settings - Fork 89
Java analysis support #68
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
Conversation
539defd to
dd73723
Compare
dd73723 to
35b2c2e
Compare
35b2c2e to
ee9b6c7
Compare
93c5848 to
a68ce82
Compare
To ease ITs with vscode-java
abd16ec to
20b9bb1
Compare
20b9bb1 to
9d38d81
Compare
|
Hi @henryju, the PR looks good to me. |
jblievremont
left a comment
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 with a few minor comments.
Tested:
✔️ Offline single module Maven project
✔️ Offline rule activation/deactivation
✔️ Single module Maven project in connected mode
✔️ Offline multi module Maven project
✔️ Multi module Maven project in connected mode
CHANGELOG.md
Outdated
| @@ -1,3 +1,7 @@ | |||
| ## 1.15.0 | |||
|
|
|||
| * Add support for Java analysis | |||
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.
I think we should mention the soft dependency on vscode-java v0.56+, either here or in the Requirements section in README.md
| # The following should be moved in related sub-directories | ||
| server/sonar-web/src/main/webapp/stylesheets/sonar-colorizer.css | ||
| server/sonar-web/src/main/webapp/deploy/plugins | ||
| server/sonar-web/src/main/webapp/deploy/bootstrap | ||
| server/sonar-web/src/main/webapp/deploy/maven/org | ||
| server/sonar-web/src/main/webapp/WEB-INF/log/ | ||
| server/sonar-web/src/main/webapp/deploy/*.jar | ||
| server/sonar-web/src/main/webapp/deploy/jdbc-driver.txt |
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.
Nitpick: this .gitignore could be leaner, e.g with only stuff related to Maven, IDE and OS
| { | ||
| "folders": [ | ||
| { | ||
| "path": "/home/julien/Prog/Projects/sonarlint/sonarlint-vscode/its/samples/sample-java-maven-multi-module" |
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.
Not sure of this one 😅
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.
Good catch. I wonder how it is possible that ITs are passing on Azure with this mistake. Maybe VSCode is smart enough to fallback on local folders...
| "which": { | ||
| "version": "1.0.9", | ||
| "resolved": "https://repox.jfrog.io/repox/api/npm/npm/which/-/which-1.0.9.tgz", | ||
| "resolved": "https://registry.npmjs.org/which/-/which-1.0.9.tgz", |
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.
Nitpick: this diff should not happen (maybe repox was unavailable when you ran npm install?)
| "winreg": { | ||
| "version": "1.2.4", | ||
| "resolved": "https://repox.jfrog.io/repox/api/npm/npm/winreg/-/winreg-1.2.4.tgz", | ||
| "resolved": "https://registry.npmjs.org/winreg/-/winreg-1.2.4.tgz", |
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.
Same as above
src/extension.ts
Outdated
|
|
||
| languageClient.onReady().then(() => | ||
| languageClient.onReady().then(() => { | ||
| languageClient.onRequest(ShowRuleDescriptionRequest.type, params => { |
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.
For consistency with the other request declaration, this ought to be extracted to a named function.
src/extension.ts
Outdated
| installClasspathListener(); | ||
| } | ||
|
|
||
| function installClasspathListener() { |
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.
Nitpick: we could extract functions related to support of Java in a dedicated module (e.g java.ts), to avoid clutter in extension.ts
6ea0ad2 to
2ebf6bb
Compare
| let languageClient: SonarLintExtendedLanguageClient; | ||
|
|
||
| function logToSonarLintOutput(message) { | ||
| export function logToSonarLintOutput(message) { |
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.
I wonder whether we should extract logging stuff to a dedicated module also. As it stands now, there is a cyclic dependency between extension.ts and java.ts - not a big issue, but annoying nonetheless.
2d17c6b to
6a19342
Compare
See discussion on #28
Related changes on LS side:
SonarSource/sonarlint-language-server#10