Controlling Scancode Output and Filters¶
Output Control Options¶
--strip-root | Strip the root directory segment of all paths. |
--full-root | Report full, absolute paths. |
Note
The options --strip-root
and --full-root
can’t be used together, i.e. any one option
may be used in a single scan.
Note
The default is to always include the last directory segment of the scanned path such that all paths have a common root directory.
--strip-root
Vs. --full-root
¶
For a default scan of the “samples” folder, this a comparision between the default, strip-root
and full-root
options.
These two changes only the “path” attribute of the file information. For this comparision we
compare the “path” attributes of the file LICENSE
inside JGroups
directory. The paths are
The default
"path": "samples/JGroups/LICENSE",
For the --full-root
option, the path relative to the Root of your local filesystem.
"path": "/home/ayansm/Desktop/GSoD/scancode-toolkit-versions/scancode-toolkit-2.2.1/samples/JGroups/LICENSE"
For the --strip-root
option, the root directory (here samples
) is removed from path :
"path": "JGroups/LICENSE"