don't make typecheck issues without file/line info
This commit is contained in:
parent
7278b7ae8a
commit
55a18ae18a
@ -395,7 +395,7 @@ func (e *Executor) setupExitCode(ctx context.Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if e.exitCode == exitcodes.Success &&
|
if e.exitCode == exitcodes.Success &&
|
||||||
os.Getenv("GL_TEST_RUN") == "1" &&
|
(os.Getenv("GL_TEST_RUN") == "1" || os.Getenv("FAIL_ON_WARNINGS") == "1") &&
|
||||||
len(e.reportData.Warnings) != 0 {
|
len(e.reportData.Warnings) != 0 {
|
||||||
|
|
||||||
e.exitCode = exitcodes.WarningInTest
|
e.exitCode = exitcodes.WarningInTest
|
||||||
|
@ -63,11 +63,8 @@ func (lint TypeCheck) Run(ctx context.Context, lintCtx *linter.Context) ([]resul
|
|||||||
errors := libpackages.ExtractErrors(pkg)
|
errors := libpackages.ExtractErrors(pkg)
|
||||||
for _, err := range errors {
|
for _, err := range errors {
|
||||||
i, perr := lint.parseError(err)
|
i, perr := lint.parseError(err)
|
||||||
if perr != nil {
|
if perr != nil { // failed to parse
|
||||||
res = append(res, result.Issue{
|
lintCtx.Log.Errorf("typechecking error: %s", err.Msg)
|
||||||
Text: err.Msg,
|
|
||||||
FromLinter: lint.Name(),
|
|
||||||
})
|
|
||||||
} else {
|
} else {
|
||||||
res = append(res, *i)
|
res = append(res, *i)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user