-
Notifications
You must be signed in to change notification settings - Fork 81
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
SLVSCODE-1004 multi region support #681
base: master
Are you sure you want to change the base?
SLVSCODE-1004 multi region support #681
Conversation
4309dc6
to
020d8ee
Compare
6f2aa67
to
fbc20a7
Compare
@@ -319,3 +320,23 @@ export function getSeverity(severity: number): vscode.DiagnosticSeverity { | |||
return vscode.DiagnosticSeverity.Warning; | |||
} | |||
} | |||
|
|||
export function sonarCloudRegionToLabel(region: number): SonarCloudRegion { |
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 decided to implement the conversion here instead of the language server because I would have to rewrite several classes to achieve it there
fbc20a7
to
cc8dbf2
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.
Looks good from a functional point of view 👍🏻 please check my comments about the implementation 👀
return { | ||
label: s.projectKey, | ||
description: s.organization || s.serverUrl, | ||
detail: s.organization ? 'SonarQube Cloud' : 'SonarQube Server' | ||
detail: s.organization ? `[${s.region}] SonarQube Cloud` : 'SonarQube Server', |
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, is it OK to always have the region displayed here vs what is done for the tree view items?
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 added the check for Dogfooding Environment. Otherwise, in this case user needs to make an explicit choice, so the more details we display the better (I think). Also, users ending up in this branch is quite a rare case (I think) :D .
@@ -601,6 +607,7 @@ export interface AssistCreatingConnectionParams { | |||
isSonarCloud: boolean; | |||
serverUrlOrOrganisationKey: string; | |||
token: string; | |||
region?: number; |
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 type expected here? Should it be the same as the one used in ConnectionSuggestion
?
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.
In fact, the type in ConnectionSuggestion should be a number
too. I decided to do the conversion completely on the client side.
1103c2c
to
f48c08a
Compare
f48c08a
to
5e39b88
Compare
|
SLVSCODE-1004
SLVSCODE-1005
SLVSCODE-1006
SLVSCODE-1008