From c013d1b1267edc0c3d3690b26741641368af3f24 Mon Sep 17 00:00:00 2001 From: Elliot Hillary Date: Fri, 11 Oct 2024 16:33:17 +1100 Subject: [PATCH 1/2] Disable vsce package interactive prompt in build.ps1 --- scripts/build.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build.ps1 b/scripts/build.ps1 index 2aa52865..ab856dcc 100644 --- a/scripts/build.ps1 +++ b/scripts/build.ps1 @@ -183,7 +183,7 @@ function Invoke-VscCompanionCompile { Push-Location (Join-Path $PSScriptRoot ..\companion\delphilint-vscode) try { & npm install - & npx @vscode/vsce package --skip-license + & npx -y @vscode/vsce package --skip-license } finally { Pop-Location From 9a2dee6836d62805f80698c5405bc1731f945d10 Mon Sep 17 00:00:00 2001 From: Elliot Hillary Date: Fri, 11 Oct 2024 16:35:12 +1100 Subject: [PATCH 2/2] Tidy up Sonar issues --- companion/delphilint-vscode/src/command.ts | 2 +- .../au/com/integradev/delphilint/server/AnalysisServer.java | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/companion/delphilint-vscode/src/command.ts b/companion/delphilint-vscode/src/command.ts index aa6dfc97..d007d14c 100644 --- a/companion/delphilint-vscode/src/command.ts +++ b/companion/delphilint-vscode/src/command.ts @@ -148,7 +148,7 @@ async function retrieveEffectiveConfiguration( config.projectKey = projectOptions.projectKey(); console.log(settings.getSonarTokens()); - let sonarTokens = settings.getSonarTokens(); + const sonarTokens = settings.getSonarTokens(); config.apiToken = sonarTokens[projectOptions.sonarHostUrl()]?.[ diff --git a/server/delphilint-server/src/main/java/au/com/integradev/delphilint/server/AnalysisServer.java b/server/delphilint-server/src/main/java/au/com/integradev/delphilint/server/AnalysisServer.java index 97a537d4..94524fa2 100644 --- a/server/delphilint-server/src/main/java/au/com/integradev/delphilint/server/AnalysisServer.java +++ b/server/delphilint-server/src/main/java/au/com/integradev/delphilint/server/AnalysisServer.java @@ -121,8 +121,7 @@ public void analyze(RequestAnalyze requestAnalyze, Consumer sendMes sonarHost, properties); - ResponseAnalyzeResult result = - ResponseAnalyzeResult.fromIssueSet(issues, logOutput.getMessages()); + var result = ResponseAnalyzeResult.fromIssueSet(issues, logOutput.getMessages()); result.convertPathsToAbsolute(requestAnalyze.getBaseDir()); sendMessage.accept(LintMessage.analyzeResult(result)); } catch (SonarHostUnauthorizedException e) {