Skip to content

Commit 038eb03

Browse files
committed
Update deps for go-inspector
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
1 parent 26cf993 commit 038eb03

File tree

5 files changed

+189
-3
lines changed

5 files changed

+189
-3
lines changed

requirements-linux.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
packagedcode-msitools==0.101.210706
22
regipy==3.1.0
33
rpm-inspector-rpm==4.16.1.3.210404
4-
go-inspector
4+
go-inspector==0.3.0

setup-mini.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ packages =
150150
rpm_inspector_rpm >= 4.16.1.3; platform_system == 'Linux'
151151
regipy >= 3.1.0; platform_system == 'Linux'
152152
packagedcode_msitools >= 0.101.210706; platform_system == 'Linux'
153+
go-inspector >= 0.3.0; platform_system == 'Linux'
153154

154155

155156
[options.entry_points]

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ packages =
150150
rpm_inspector_rpm >= 4.16.1.3; platform_system == 'Linux'
151151
regipy >= 3.1.0; platform_system == 'Linux'
152152
packagedcode_msitools >= 0.101.210706; platform_system == 'Linux'
153-
go-inspector ; platform_system == 'Linux'
153+
go-inspector >= 0.3.0; platform_system == 'Linux'
154154

155155

156156
[options.entry_points]
Lines changed: 182 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,182 @@
1+
Usage: scancode [OPTIONS] <OUTPUT FORMAT OPTION(s)> <input>...
2+
3+
scan the <input> file or directory for license, origin and packages and save
4+
results to FILE(s) using one or more output format option.
5+
6+
Error and progress are printed to stderr.
7+
8+
Options:
9+
10+
primary scans:
11+
-l, --license Scan <input> for licenses.
12+
-p, --package Scan <input> for application package and dependency
13+
manifests, lockfiles and related data.
14+
--system-package Scan <input> for installed system package databases.
15+
--package-only Scan for system and application package data and skip
16+
license/copyright detection and top-level package creation.
17+
-c, --copyright Scan <input> for copyrights.
18+
--go-symbol Collect Go symbols.
19+
20+
other scans:
21+
-i, --info Scan <input> for file information (size, checksums, etc).
22+
--generated Classify automatically generated code files with a flag.
23+
-e, --email Scan <input> for emails.
24+
-u, --url Scan <input> for urls.
25+
26+
scan options:
27+
--license-diagnostics In license detections, include diagnostic details
28+
to figure out the license detection post
29+
processing steps applied.
30+
--license-score INTEGER Do not return license matches with a score lower
31+
than this score. A number between 0 and 100.
32+
[default: 0]
33+
--license-text Include the detected licenses matched text.
34+
--license-text-diagnostics In the matched license text, include diagnostic
35+
highlights surrounding with square brackets []
36+
words that are not matched.
37+
--license-url-template TEXT Set the template URL used for the license
38+
reference URLs. Curly braces ({}) are replaced by
39+
the license key. [default: https://scancode-
40+
licensedb.aboutcode.org/{}]
41+
--max-email INT Report only up to INT emails found in a file. Use
42+
0 for no limit. [default: 50]
43+
--max-url INT Report only up to INT urls found in a file. Use 0
44+
for no limit. [default: 50]
45+
--unknown-licenses [EXPERIMENTAL] Detect unknown licenses.
46+
47+
output formats:
48+
--json FILE Write scan output as compact JSON to FILE.
49+
--json-pp FILE Write scan output as pretty-printed JSON to FILE.
50+
--json-lines FILE Write scan output as JSON Lines to FILE.
51+
--yaml FILE Write scan output as YAML to FILE.
52+
--csv FILE [DEPRECATED] Write scan output as CSV to FILE. The
53+
--csv option is deprecated and will be replaced by new
54+
CSV and tabular output formats in the next ScanCode
55+
release. Visit https://github.com/nexB/scancode-
56+
toolkit/issues/3043 to provide inputs and feedback.
57+
--html FILE Write scan output as HTML to FILE.
58+
--custom-output FILE Write scan output to FILE formatted with the custom
59+
Jinja template file.
60+
--debian FILE Write scan output in machine-readable Debian copyright
61+
format to FILE.
62+
--custom-template FILE Use this Jinja template FILE as a custom template.
63+
--cyclonedx FILE Write scan output in CycloneDX JSON format to FILE.
64+
--cyclonedx-xml FILE Write scan output in CycloneDX XML format to FILE.
65+
--spdx-rdf FILE Write scan output as SPDX RDF to FILE.
66+
--spdx-tv FILE Write scan output as SPDX Tag/Value to FILE.
67+
68+
output filters:
69+
--ignore-author <pattern> Ignore a file (and all its findings) if an
70+
author contains a match to the <pattern>
71+
regular expression. Note that this will ignore
72+
a file even if it has other findings such as a
73+
license or errors.
74+
--ignore-copyright-holder <pattern>
75+
Ignore a file (and all its findings) if a
76+
copyright holder contains a match to the
77+
<pattern> regular expression. Note that this
78+
will ignore a file even if it has other
79+
scanned data such as a license or errors.
80+
--only-findings Only return files or directories with findings
81+
for the requested scans. Files and directories
82+
without findings are omitted (file information
83+
is not treated as findings).
84+
85+
output control:
86+
--full-root Report full, absolute paths.
87+
--strip-root Strip the root directory segment of all paths. The default is to
88+
always include the last directory segment of the scanned path
89+
such that all paths have a common root directory.
90+
91+
pre-scan:
92+
--ignore <pattern> Ignore files matching <pattern>.
93+
--include <pattern> Include files matching <pattern>.
94+
--facet <facet>=<pattern> Add the <facet> to files with a path matching
95+
<pattern>.
96+
97+
post-scan:
98+
--classify Classify files with flags telling if the file is a
99+
legal, or readme or test file, etc.
100+
--consolidate Group resources by Packages or license and copyright
101+
holder and return those groupings as a list of
102+
consolidated packages and a list of consolidated
103+
components. This requires the scan to have/be run
104+
with the copyright, license, and package options
105+
active
106+
--filter-clues Filter redundant duplicated clues already contained
107+
in detected license and copyright texts and notices.
108+
--license-clarity-score Compute a summary license clarity score at the
109+
codebase level.
110+
--license-policy FILE Load a License Policy file and apply it to the scan
111+
at the Resource level.
112+
--license-references Return reference data for all licenses and license
113+
rules present in detections.
114+
--mark-source Set the "is_source" to true for directories that
115+
contain over 90% of source files as children and
116+
descendants. Count the number of source files in a
117+
directory as a new source_file_counts attribute
118+
--summary Summarize scans by providing declared origin
119+
information and other detected origin info at the
120+
codebase attribute level.
121+
--tallies Compute tallies for license, copyright and other
122+
scans at the codebase level.
123+
--tallies-by-facet Compute tallies for license, copyright and other
124+
scans and group the results by facet.
125+
--tallies-key-files Compute tallies for license, copyright and other
126+
scans for key, top-level files. Key files are top-
127+
level codebase files such as COPYING, README and
128+
package manifests as reported by the --classify
129+
option "is_legal", "is_readme", "is_manifest" and
130+
"is_top_level" flags.
131+
--tallies-with-details Compute tallies of license, copyright and other scans
132+
at the codebase level, keeping intermediate details
133+
at the file and directory level.
134+
--todo Summarize scans by providing all ambiguous detections
135+
which are todo items and needs manual review.
136+
137+
core:
138+
--timeout <seconds> Stop an unfinished file scan after a timeout in
139+
seconds. [default: 120 seconds]
140+
-n, --processes INT Set the number of parallel processes to use. Disable
141+
parallel processing if 0. Also disable threading if
142+
-1. [default: 1]
143+
-q, --quiet Do not print summary or progress.
144+
-v, --verbose Print progress as file-by-file path instead of a
145+
progress bar. Print verbose scan counters.
146+
--from-json Load codebase from one or more <input> JSON scan
147+
file(s).
148+
--max-in-memory INTEGER Maximum number of files and directories scan details
149+
kept in memory during a scan. Additional files and
150+
directories scan details above this number are cached
151+
on-disk rather than in memory. Use 0 to use unlimited
152+
memory and disable on-disk caching. Use -1 to use
153+
only on-disk caching. [default: 10000]
154+
--max-depth INTEGER Maximum nesting depth of subdirectories to scan.
155+
Descend at most INTEGER levels of directories below
156+
and including the starting directory. Use 0 for no
157+
scan depth limit.
158+
159+
documentation:
160+
-h, --help Show this message and exit.
161+
-A, --about Show information about ScanCode and licensing and exit.
162+
-V, --version Show the version and exit.
163+
--examples Show command examples and exit.
164+
--list-packages Show the list of supported package manifest parsers and exit.
165+
--plugins Show the list of available ScanCode plugins and exit.
166+
--print-options Show the list of selected options and exit.
167+
168+
Examples (use --examples for more):
169+
170+
Scan the 'samples' directory for licenses and copyrights.
171+
Save scan results to the 'scancode_result.json' JSON file:
172+
173+
scancode --license --copyright --json-pp scancode_result.json samples
174+
175+
Scan the 'samples' directory for licenses and package manifests. Print scan
176+
results on screen as pretty-formatted JSON (using the special '-' FILE to print
177+
to on screen/to stdout):
178+
179+
scancode --json-pp - --license --package samples
180+
181+
Note: when you run scancode, a progress bar is displayed with a counter of the
182+
number of files processed. Use --verbose to display file-by-file progress.

tests/scancode/test_cli.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -679,7 +679,10 @@ def test_scan_does_scan_rpm():
679679

680680

681681
def test_scan_cli_help(regen=REGEN_TEST_FIXTURES):
682-
expected_file = test_env.get_test_loc('help/help.txt')
682+
if on_linux:
683+
expected_file = test_env.get_test_loc('help/help_linux.txt')
684+
else:
685+
expected_file = test_env.get_test_loc('help/help.txt')
683686
result = run_scan_click(['--help'])
684687
result = result.output
685688
if regen:

0 commit comments

Comments
 (0)