Browse files

Document syntax for ignoring checks

  • Loading branch information...
1 parent 766048d commit 5bf56c237b9660d8476ebd0e9ff14e6f06215a7d @dominikh committed Nov 15, 2016
Showing with 28 additions and 0 deletions.
  1. +28 −0
@@ -89,3 +89,31 @@ bytes.Compare(a, b) != 0 -> !bytes.Equal(a, b)
time.Now().Sub(a) -> time.Since(a)
+## Ignoring checks
+gosimple allows disabling some or all checks for certain files. The
+`-ignore` flag takes a whitespace-separated list of
+`glob:check1,check2,...` pairs. `glob` is a glob pattern matching
+files in packages, and `check1,check2,...` are checks named by their
+For example, to ignore uses of strconv.FormatInt in all test files in the
+`os/exec` package, you would write `-ignore
+Additionally, the check IDs support globbing, too. Using a pattern
+such as `os/exec/*.gen.go:*` would disable all checks in all
+auto-generated files in the os/exec package.
+Any whitespace can be used to separate rules, including newlines. This
+allows for a setup like the following:
+$ cat stdlib.ignore
+$ gosimple -ignore "$(cat stdlib.ignore)" std

0 comments on commit 5bf56c2

Please sign in to comment.