Go-tools: gosimple: ignore checks for all packages/files

Created on 18 Oct 2017  ·  2Comments  ·  Source: dominikh/go-tools

How can I instruct the cmd line tools to ignore specific checks for all packages? I want to reduce the noise from (e.g. S1002) and focus on more serious issues first.
-ignore looks like it's only available for specific files. The following still checks S1002.
gosimple -ignore '*.*:S1002' -tests=false ./...

enhancement

Most helpful comment

Let's add a special case for *:Sxxxx to mean all packages.

All 2 comments

-ignore uses filepath.Match, so no fancy ** expansion. It seems like there are only two options. The first is

gosimple -ignore '*:S1002 */*:S1002 */*/*:S1002 */*/*/*:S1002 */*/*/*/*:S1002' ./...

Repeat ad nauseam. Alternatively,

gosimple -ignore "$(go list ./... | sed 's#$#/*:S1002#')" ./...

Let's add a special case for *:Sxxxx to mean all packages.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

axcdnt picture axcdnt  ·  3Comments

rayjlinden picture rayjlinden  ·  4Comments

Jacalz picture Jacalz  ·  4Comments

jtreleaven picture jtreleaven  ·  3Comments

dominikh picture dominikh  ·  3Comments