Skip to content

Commit

Permalink
docs(README.md): Add abspath, mod, and ignoregenerated flag docs (#220)
Browse files Browse the repository at this point in the history
Noticed that some useful flags were not documented in the README.md. I've added the these in what I think are the relevant sections. I did a minimal explanation of the flags, but can expand on them.

I erred on the side of not expanding on -ignoregenerated for example because the regex might change in the future, and documentation tends to be a forgotten update...
  • Loading branch information
edwinavalos authored Jan 11, 2023
1 parent 3faf0bc commit a3c6ea7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ takes no arguments.
The `-blank` flag enables checking for assignments of errors to the
blank identifier. It takes no arguments.

The `-abspath` flag prints the absolute paths to files with unchecked errors.

The `-mod` flag sets the module download mode to use: `readonly` or `vendor`.

### go/analysis

The package provides `Analyzer` instance that can be used with
Expand Down Expand Up @@ -120,6 +124,8 @@ specified for it. To disable this, specify a regex that matches nothing:
The `-ignoretests` flag disables checking of `_test.go` files. It takes
no arguments.

The `-ignoregenerated` flag disables checking of generated source code. It takes no arguments.

## Exit Codes

errcheck returns 1 if any problems were found in the checked files.
Expand Down

0 comments on commit a3c6ea7

Please sign in to comment.