From 37a657fab22e1b0b10dc4ff5a0d0ebf973fa3419 Mon Sep 17 00:00:00 2001 From: sandyyeah100 <180869317+sandyyeah100@users.noreply.github.com> Date: Sun, 8 Sep 2024 22:04:31 -0700 Subject: [PATCH] Code refactoring for go analyzer. --- analyzer-golangcilint/doc/doc.md | 2 +- .../scanner/analyzer/golangcilint/GolangcilintCodeAnalyzer.java | 1 - .../analyzer/golangcilint/GolangcilintResultConverter.java | 2 -- 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/analyzer-golangcilint/doc/doc.md b/analyzer-golangcilint/doc/doc.md index ec49497..d872fa6 100644 --- a/analyzer-golangcilint/doc/doc.md +++ b/analyzer-golangcilint/doc/doc.md @@ -1,4 +1,4 @@ -Find al the go.mod files +Find all the go.mod files golangci-lint run ./foo./... ./bar/... ./qux/... diff --git a/analyzer-golangcilint/src/main/java/io/codety/scanner/analyzer/golangcilint/GolangcilintCodeAnalyzer.java b/analyzer-golangcilint/src/main/java/io/codety/scanner/analyzer/golangcilint/GolangcilintCodeAnalyzer.java index 336704b..50dedf9 100644 --- a/analyzer-golangcilint/src/main/java/io/codety/scanner/analyzer/golangcilint/GolangcilintCodeAnalyzer.java +++ b/analyzer-golangcilint/src/main/java/io/codety/scanner/analyzer/golangcilint/GolangcilintCodeAnalyzer.java @@ -44,7 +44,6 @@ public List analyzeCode(AnalyzerConfigurationDetailDto ru String[] command = cmdList.toArray(new String[0]); - RuntimeExecUtil.RuntimeExecResult runtimeExecResult = RuntimeExecUtil.exec(command, file.getAbsolutePath(), 60, false, null); String errorOutput = runtimeExecResult.getErrorOutput(); diff --git a/analyzer-golangcilint/src/main/java/io/codety/scanner/analyzer/golangcilint/GolangcilintResultConverter.java b/analyzer-golangcilint/src/main/java/io/codety/scanner/analyzer/golangcilint/GolangcilintResultConverter.java index 1fb91b0..86f3bdc 100644 --- a/analyzer-golangcilint/src/main/java/io/codety/scanner/analyzer/golangcilint/GolangcilintResultConverter.java +++ b/analyzer-golangcilint/src/main/java/io/codety/scanner/analyzer/golangcilint/GolangcilintResultConverter.java @@ -5,7 +5,6 @@ import io.codety.scanner.analyzer.golangcilint.dto.GolangcilintPos; import io.codety.scanner.analyzer.golangcilint.dto.GolangcilintRoot; import io.codety.scanner.reporter.dto.CodeAnalysisIssueDto; -import io.codety.scanner.util.CodetyConsoleLogger; import io.codety.scanner.util.JsonFactoryUtil; import java.util.ArrayList; @@ -45,7 +44,6 @@ public static List convertResult(String errorOutput, Strin throw new RuntimeException(e); } - return codeAnalysisIssueDtos; } }