Print first compilation error in warning about inability to run megacheck because of compilation errors

This commit is contained in:
Denis Isaev 2018-06-28 09:10:02 +03:00 committed by Isaev Denis
parent fb38e51c83
commit 5ef542facd
2 changed files with 36 additions and 3 deletions

View file

@ -43,7 +43,7 @@ func (p Diff) Process(issues []result.Issue) ([]result.Issue, error) {
if p.patchFilePath != "" {
patch, err := ioutil.ReadFile(p.patchFilePath)
if err != nil {
return nil, fmt.Errorf("can't read from pathc file %s: %s", p.patchFilePath, err)
return nil, fmt.Errorf("can't read from patch file %s: %s", p.patchFilePath, err)
}
patchReader = bytes.NewReader(patch)
} else if p.patch != "" {