golangci / golangci-lint-action

Official GitHub Action for golangci-lint from its authors
https://github.com/marketplace/actions/golangci-lint
MIT License
1.08k stars 151 forks source link

typecheck error is not resulting in useful annotation #802

Closed sgtsquiggs closed 1 year ago

sgtsquiggs commented 1 year ago

Welcome

Description of the problem

Typecheck errors result in annotations that are not descriptive of the error and also are attached to the wrong files:

image

image image

Version of golangci-lint

1.52.2

Version of the GitHub Action

3

Workflow file

``` (SNIP) - uses: golangci/golangci-lint-action@v3 with: version: v1.52.2 args: --verbose --timeout=15m --config=$FLEET_DAEDALUS_HOME/.golangci.yml skip-cache: true working-directory: src/daedalus/services/opsgate (SNIP) ```

Go version

1.20.6

Code example or link to a public repository

Code triggering typecheck error: ```go errors.Wrap(previousBusinessDateErr, "failed to get next business date", "Today date", today.Date) ```
bombsimon commented 1 year ago

typecheck is not a real linter, it's just a way to parse/display "compilation" and linters errors (linter reports are not errors). So if you have typecheck reports, you will not have other reports.

Because of this, the output and thus annotations are not reliable.

sgtsquiggs commented 1 year ago

Ok. I understand the error (was reviewing code) just expected the annotation to work. I’ll build before I lint to avoid these issues.