Command-line interface#
swh scanner scan#
Scan a source code project to discover files and directories already present in the archive.
The command can provide different output using the –output-format option:
- text: display the scan result as a text based tree-like view of all the
file, using color to indicate the file status.
json: write all collected data on standard output as JSON
json: write all collected data on standard output as Newline Delimited JSON
sunburst: produce a dynamic chart as .html file. (in $PWD/chart.html)
The source code project can be checked using different policies that can be set using the -p/–policy option:
bfs: scan the source code in the BFS order, checking unknown directories only.
dirpriority: scan all the source code directories and check only unknown directory contents.
Other information about software artifacts could be specified with the -e/ –extra-info option:
swh scanner scan [OPTIONS] [ROOT_PATH]
Options
- -u, --api-url <API_URL>#
URL for the api request
- -x, --exclude <PATTERN>#
Exclude directories using glob patterns (e.g.,
*.git
to exclude all .git directories)
- -f, --output-format <out_fmt>#
The output format
- Default:
summary
- Options:
summary | text | json | ndjson | sunburst
- -i, --interactive#
Show the result in a dashboard
- -p, --policy <policy>#
The scan policy.
- Default:
auto
- Options:
auto | bfs | greedybfs | filepriority | dirpriority
- -e, --extra-info <extra_info>#
Add selected additional information about known software artifacts.
- Options:
origin
Arguments
- ROOT_PATH#
Optional argument