Skip to content

new custom linters didn't show in "Issue" or "Report" and "fmt.Println" didn't printed #2769

Answered by ldez
cuizhiqiang0 asked this question in Q&A
Discussion options

You must be logged in to vote

This behavior is expected: every data sent to os.Stdout/Stderr (i.e. all the output of functions like fmt.Printxx) by a linter is discarded.
A linter should create reports not display things by itself.

If you want to cancel this discard (which I don't recommend), you should use the following debug key linters_output.

$ GL_DEBUG=linters_output ./golangci-lint run

https://golangci-lint.run/contributing/debug/

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@HejVkt
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by ldez
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants
Converted from issue

This discussion was converted from issue #2768 on April 17, 2022 06:00.