Lint against fmt.Println except in main.go (#98)

## Summary:
Usually this is an artifact of debugging, not intentional!  And it's
come up a few times, luckily all noticed by reviewers.

## Test plan:
make check


Author: benjaminjkraft

Reviewers: dnerdy, jvoll

Required Reviewers: 

Approved By: dnerdy

Checks:  Test (1.17),  Test (1.16),  Test (1.15),  Test (1.14),  Lint,  Test (1.17),  Test (1.16),  Test (1.15),  Test (1.14),  Lint

Pull Request URL: https://github.com/Khan/genqlient/pull/98
This commit is contained in:
Ben Kraft
2021-09-15 17:57:52 -07:00
committed by GitHub
parent ce079a7e16
commit 463cffdede
+13 -1
View File
@@ -30,6 +30,7 @@ linters:
- unconvert
- unparam
- whitespace
- forbidigo
linters-settings:
errcheck:
@@ -52,6 +53,12 @@ linters-settings:
- gopkg.in/yaml.v2
- github.com/alexflint/go-arg
forbidigo:
forbid:
- '^print(|f|ln)$'
- '^fmt\.Print(|f|ln)$'
gocritic:
# Which checks should be enabled:
# See https://go-critic.github.io/overview#checks-overview
@@ -82,7 +89,12 @@ issues:
# Test-only deps are not restricted.
- linters:
- depguard
path: _test\.go$|internal/testutil/|internal/integration/
path: _test\.go$|^internal/testutil/|^internal/integration/
# Ok to use fmt.Print in the examples, and in the CLI entrypoint.
- linters:
- forbidigo
path: ^example/|^generate/main\.go$
- linters:
- errcheck