mirror of
https://github.com/securego/gosec.git
synced 2025-11-27 22:28:20 +02:00
update readme to provide info regarding package level scans
This commit is contained in:
@@ -64,12 +64,8 @@ $ gas -exclude=G303 ./...
|
|||||||
|
|
||||||
#### Excluding files:
|
#### Excluding files:
|
||||||
|
|
||||||
Gas can be told to \ignore paths that match a supplied pattern using the 'skip' command line option. This is
|
Gas will ignore dependencies in your vendor directory any files
|
||||||
accomplished via [go-glob](github.com/ryanuber/go-glob). Multiple patterns can be specified as follows:
|
that are not considered build artifacts by the compiler (so test files).
|
||||||
|
|
||||||
```
|
|
||||||
$ gas -skip=tests* -skip=*_example.go ./...
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Annotating code
|
#### Annotating code
|
||||||
|
|
||||||
|
|||||||
@@ -47,10 +47,10 @@ USAGE:
|
|||||||
$ gas -fmt=json -out=results.json ./...
|
$ gas -fmt=json -out=results.json ./...
|
||||||
|
|
||||||
# Run a specific set of rules (by default all rules will be run):
|
# 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
|
# Run all rules except the provided
|
||||||
$ gas -exclude=G101 ./...
|
$ gas -exclude=G101 $GOPATH/src/github.com/example/project/...
|
||||||
|
|
||||||
`
|
`
|
||||||
)
|
)
|
||||||
@@ -156,10 +156,6 @@ func main() {
|
|||||||
// Setup usage description
|
// Setup usage description
|
||||||
flag.Usage = usage
|
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
|
// Parse command line arguments
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user