Skip to content
Discussion options

You must be logged in to vote

TLDR; ~/.golangci.toml was a sym-link and its was using the linked-to file's path in the output. Eliminating the sym-link fixes the issue.

I noticed something odd when poking at this today. I have my default golangci-lint config at ~/.golangci.toml, but it is a sym-link to the file in my local dotfiles repo. When I run golangci-lint on the command line, with the above example in ~/tmp, I get the output...

$ golangci-lint run no-lint.go
../../../tmp/no-lint.go:10:10: Error return value of `fp.Close` is not checked (errcheck)
	fp.Close()
	        ^
1 issues:
* errcheck: 1

The ../../../tmp/ part of the path was odd and I figured out that it was using the path of the linked-to .golangci.toml …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by eikenb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant
Converted from issue

This discussion was converted from issue #14055 on July 26, 2025 16:46.