Skip to content

Commit

Permalink
update readme to provide info regarding package level scans
Browse files Browse the repository at this point in the history
  • Loading branch information
gcmurphy committed Dec 13, 2017
1 parent 02901b9 commit e3b6fd9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,8 @@ $ gas -exclude=G303 ./...

#### Excluding files:

Gas can be told to \ignore paths that match a supplied pattern using the 'skip' command line option. This is
accomplished via [go-glob](github.com/ryanuber/go-glob). Multiple patterns can be specified as follows:

```
$ gas -skip=tests* -skip=*_example.go ./...
```
Gas will ignore dependencies in your vendor directory any files
that are not considered build artifacts by the compiler (so test files).

#### Annotating code

Expand Down
8 changes: 2 additions & 6 deletions cmd/gas/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ USAGE:
$ gas -fmt=json -out=results.json ./...
# Run a specific set of rules (by default all rules will be run):
$ gas -include=G101,G203,G401 ./...
$ gas -include=G101,G203,G401 ./...
# Run all rules except the provided
$ gas -exclude=G101 ./...
$ gas -exclude=G101 $GOPATH/src/github.com/example/project/...
`
)
Expand Down Expand Up @@ -156,10 +156,6 @@ func main() {
// Setup usage description
flag.Usage = usage

// Exclude files
excluded := newFileList("*_test.go")
flag.Var(excluded, "skip", "File pattern to exclude from scan. Uses simple * globs and requires full or partial match")

// Parse command line arguments
flag.Parse()

Expand Down

0 comments on commit e3b6fd9

Please sign in to comment.