-
Notifications
You must be signed in to change notification settings - Fork 490
blacklist of files #98
Comments
Just use grep to filter the output if that's what you want. Golint does not force you to address every thing it flags (there will be false positives). |
Grep will always return exit 0. Is golint always going to return 0? |
Most likely, though it's trivial enough to run (golint ... || true) to make sure. |
We'd like our CI to fail on linting errors, grep masks that. |
That's not what golint is for. It does not produce errors, only |
@drewwells: Static analysis tools like golint always produce suggestions. There can be a lot of false positives in there and there is often no way to flag them. However, I too like my CI to fail because I often forget to run all tools myself. You can have a look at the linting section here https://github.com/zimmski/tavor/blob/master/.travis.yml to get an idea on how you can accomplish the same. |
That's a good idea, thanks! We can whitelist lint suggestions that we On Wednesday, January 14, 2015, Markus Zimmermann [email protected]
|
Unfortunately this is the best we can do between golint and reviewdog: golang/lint#98 (comment)
There's currently no way to exclude certain files from linting rules ie. lint
a.go
b.go
, but skipc.go
.I tried getting around this by using
go list
, only to find thatgolint pkgA/file pkgB/file
throws errors about mismatched packages. A filter similar togo test -run
would very helpful for transitioning to the use of golint.The text was updated successfully, but these errors were encountered: