Simple configurable code scanner in Python.
scanCode.py [-h] [-v] [--config CONFIG] root_directory
Scans all source code under specified directory for project compliance using provided configuration.
- root_directory : starting directory for the scan
- -h, --help : show this help message and exit
- -v, --verbose : enable verbose output
- --config CONFIG : provide custom configuration file
List of filenames containing the text of valid license (headers). These files SHOULD be in the same directory path where scanCode.py resides.
Filters (path/filename) with wildcards and associated scan checks that are to be run against them. The checks are actual valid function names found in scanCode.py.
These include:
- has_block_license
- no_tabs
- no_trailing_spaces
- eol_at_eof
- check_regex
List of paths (inclusive of subdirectories) to exlude from code scanning.
List of regular expressions for forbidden strings, e.g. \[email protected]
List of additional key-value pair format options.
Currently, the following options are supported:
- LICENSE_SLACK_LENGTH (apples to check 'has_block_license')
- Not all code files allow licenses to appear starting at the first character of the file. This option tells the scan to allow licenses to appear starting within first 'x' characters of each code file (as provided by this option's value).