Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linter does not show file names or line numbers #3926

Closed
echlebek opened this issue Jul 18, 2020 · 2 comments
Closed

Linter does not show file names or line numbers #3926

echlebek opened this issue Jul 18, 2020 · 2 comments
Assignees
Labels
bug component:ci Sensu Go build, test, and CI pipeline improvements technical-debt

Comments

@echlebek
Copy link
Contributor

Expected Behavior

The golang-ci linter should show each failure in the file and line number it was encountered at.

Current Behavior

The linter simply reports failure, leaving the user to hunt for the lint themselves.

Possible Solution

???

linter

@echlebek echlebek added bug technical-debt component:ci Sensu Go build, test, and CI pipeline improvements labels Jul 18, 2020
@nikkictl nikkictl self-assigned this Jul 20, 2020
@nikkictl
Copy link

nikkictl commented Jul 20, 2020

Okay, looks like if you go to the github actions tab for the run (see https://github.com/sensu/sensu-go/actions/runs/173965429 for example), it will print out the line number responsible for the lint error. The log should definitely have that in there regardless, but thought I would share this workaround in the meantime.

Screen Shot 2020-07-20 at 11 08 10 AM

@nikkictl
Copy link

nikkictl commented Jul 20, 2020

If you read golangci-lint-action, they mention that lint failures are shown as annotations. These annotations are listed in the high level breakdown of the golangci-lint github action (see previous comment), and also displayed in commits and code reviews (see file comparison below).

Screen Shot 2020-07-20 at 2 05 22 PM

While the UX is a little counterintuitive, there isn't anything we can do from our CI to resolve this. golangci/golangci-lint-action#5 exists to create code review comments for lint issues, but has not yet been implemented.

I'm going to close out this issue, but use #3928 and https://github.com/sensu/sensu-enterprise-go/pull/1157 to bump the dependencies to the most current.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug component:ci Sensu Go build, test, and CI pipeline improvements technical-debt
Projects
None yet
Development

No branches or pull requests

2 participants