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

Complaining about imports on unchanged files and linking to comments #534

Closed
noahdietz opened this issue Aug 5, 2022 · 5 comments
Closed
Labels
question Further information is requested

Comments

@noahdietz
Copy link

On a recent PR, golangci-lint started complaining about files that we not part of the PR, that didn't actually need a goimports run (we ran it on the entire repo with no delta), and it emitted the findings on comments in the file rather than the imports section.

Here is the offending run.

Any idea what it could be?

@shwoodard
Copy link

Here's some photo evidence and a link to support:

image

Of note, it is finding issues in a directory that was not touched, and, as Noah said, it's linting a comment.

@L0ntra
Copy link

L0ntra commented Aug 5, 2022

I'm having the same problem with issues being found in comments.
Running goimports on the "offending" files does nothing and running golangci-lint locally does not detect any issues.

This is not an issue in 1.47.3

@maratori
Copy link

maratori commented Aug 5, 2022

Seems like relates to #535

@noahdietz
Copy link
Author

Seems like relates to #535

Indeed it does. I will let the maintainers decide which to de-dupe.

@SaxyPandaBear
Copy link

In order to fix this in my GitHub CI, I had to download Go 1.19 and run go1.19 fmt ./... on my repo, which performed the necessary formatting on the comment that it cared about. My project is pinned to go1.18 so 🤷

@ldez ldez added the question Further information is requested label May 4, 2024
@ldez ldez closed this as completed May 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

6 participants