Skip to content

Commit

Permalink
Fix golangcilint empty result error (#3)
Browse files Browse the repository at this point in the history
* fix_golangcilint_empty_result_error

* fix_golangcilint_empty_result_error
  • Loading branch information
random1223 authored Aug 28, 2024
1 parent 4932cac commit c166c0b
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,13 @@ public List<CodeAnalysisResultDto> analyzeCode(AnalyzerConfigurationDetailDto ru
String errorOutput = runtimeExecResult.getErrorOutput();
String successOutput = runtimeExecResult.getSuccessOutput();

if(errorOutput!=null && errorOutput.length() > 0){
CodetyConsoleLogger.debug("Error output from golangci-lint " + errorOutput);
}
if(successOutput == null || successOutput.isEmpty()){
return list;
}

List<CodeAnalysisIssueDto> codeAnalysisIssueDtoList = GolangcilintResultConverter.convertResult(successOutput);
if(codeAnalysisIssueDtoList == null || codeAnalysisIssueDtoList.isEmpty()){
return list;
Expand Down

0 comments on commit c166c0b

Please sign in to comment.