Skip to content

Commit

Permalink
Allow connecting to a remote Sonarqube / Sonarcloud instance
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven Remot committed Sep 15, 2021
1 parent 3af9782 commit f69b79b
Showing 1 changed file with 40 additions and 2 deletions.
42 changes: 40 additions & 2 deletions lsp-sonarlint.el
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,41 @@ Example: `{**/test/**,**/*test*,**/*Test*}`"
:group 'lsp-sonarlint
:type 'string)

(defcustom lsp-sonarlint-sonarqube-server-url ""
(defcustom lsp-sonarlint-connections-sonarqube []
"Connections to sonarqube instances.
Ex:
\(setq lsp-sonarlint-connections-sonarqube '[((serverUrl . \"https://...\") (token . \"my-token\"))]\)"
:group 'lsp-sonarlint
:type '(vector (alist :key-type symbol :value-type string)))

(defcustom lsp-sonarlint-connections-sonarcloud []
"Connections to sonarcloud instances.
Ex:
\(setq lsp-sonarlint-connections-sonarqube '[((connectionId . \"my-connection\") (organizationKey . \"my-organization-key\") (token . \"my-token\"))]\)"
:group 'lsp-sonarlint
:type '(vector (alist :key-type symbol :value-type string)))

(defcustom lsp-sonarlint-servers []
:group 'lsp-sonarlint
:type '(vector (alist :key-type symbol :value-type string)))

(defcustom lsp-sonarlint-project '()
"Sonar project configuration.
Ex:
\(setq lsp-sonarlint-project '((projectKey . \"my-project\"))\)"
:group 'lsp-sonarlint
:type '(alist :key-type symbol :value-type string))

(defcustom lsp-sonarlint-sonarqube-server-token ""
"URL of the server.
e.g https://<myServerUrl>"
:group 'lsp-sonarlint
:type 'string)

(defcustom lsp-sonarlint-project-key ""
"URL of the server.
e.g https://<myServerUrl>"
:group 'lsp-sonarlint
Expand Down Expand Up @@ -163,7 +197,11 @@ analyzer"
'(("sonarlint.disableTelemetry" lsp-sonarlint-disable-telemetry)
("sonarlint.testFilePattern" lsp-sonarlint-test-file-pattern)
("sonarlint.output.showAnalyzerLogs" lsp-sonarlint-show-analyzer-logs)
("sonarlint.ls.vmargs" lsp-sonarlint-vmargs)))
("sonarlint.ls.vmargs" lsp-sonarlint-vmargs)
("sonarlint.connectedMode.servers" lsp-sonarlint-servers)
("sonarlint.connectedMode.connections.sonarqube" lsp-sonarlint-connections-sonarqube)
("sonarlint.connectedMode.connections.sonarcloud" lsp-sonarlint-connections-sonarcloud)
("sonarlint.connectedMode.project" lsp-sonarlint-project)))

(lsp-register-client
(make-lsp-client
Expand Down

0 comments on commit f69b79b

Please sign in to comment.