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

Allow connecting to a remote Sonarqube instance #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

stevenremot
Copy link

@stevenremot stevenremot commented Sep 6, 2021

This is a WIP.

Missing:

  • An actually working implementation !
  • A README entry
  • The variable for sonarcloud

This PR adds the custom variables necessary, according to the VSCode extension documentation, to connect sonarlint to a remote Sonarqube instance. However, I can't get it to actually display the issues raised by my sonarqube instance.

The variables in this PR should be used this way if I understand correctly:

  (setq lsp-sonarlint-connections-sonarqube '[((serverUrl . "https://...")
						    (token . "..."))]
	      lsp-sonarlint-project '((projectKey . "...")))

I configured lsp-sonarling with my sonarqube instance, and did the same in parallel in VSCode. I enabled the language server I/O logs. I see that the params are sent to the language server, and it does it using the same structure than VSCode. So I'm not sure what's missing here... I still submit the PR in the hope someone has an idea about what I did wrong here... I will gladly close it if this was a bad idea.

Once this PR is finished and merged, this should fix #1

@henryju
Copy link

henryju commented Sep 7, 2021

However, I can't get it to actually display the issues raised by my sonarqube instance.

This is not the expected outcome of SonarLint connected mode. SonarLint will still "compute" issues locally. The difference is that in connected mode, it will use the analyzers installed on the server, as well as quality profile (rules + rules parameters) configured for the bound project.

@stevenremot
Copy link
Author

This is not the expected outcome of SonarLint connected mode. SonarLint will still "compute" issues locally.

Thanks for the clarification, that part was a bit blurry to me. Does it imply something about the issues I have on the connected mode? I'm still supposed to see the same issues in Sonarqube and in Emacs if I use the right configuration, right?

@stevenremot stevenremot force-pushed the add-connected-mode branch 2 times, most recently from f69b79b to ee0a5e9 Compare September 16, 2021 07:35
@Sasanidas
Copy link
Collaborator

Thanks for this work @stevenremot !

Can you provide a status of this pull request? 👍

@stevenremot
Copy link
Author

You're welcome! Sadly it didn't advance at all, I can't find why the language server doesn't take the variables into account while they are being sent...

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.

Connect the client to a one or more sonarqube instances
3 participants