Skip to content

Commit 3ac77d4

Browse files
Update scancode CLI reference docs for v32
Signed-off-by: Ayan Sinha Mahapatra <[email protected]>
1 parent c38e664 commit 3ac77d4

32 files changed

+1263
-958
lines changed

docs/source/cli-reference/basic-options.rst

Lines changed: 173 additions & 162 deletions
Large diffs are not rendered by default.

docs/source/cli-reference/core-options.rst

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@
77

88
----
99

10-
.. include:: /rst_snippets/note_snippets/synopsis_install_quickstart.rst
11-
12-
----
10+
.. _quiet_verbose_options:
1311

1412
Comparing Progress Message Options
1513
----------------------------------
@@ -57,6 +55,8 @@ Comparing Progress Message Options
5755

5856
----
5957

58+
.. _timeout_option:
59+
6060
``--timeout`` Option
6161
--------------------
6262

@@ -69,6 +69,8 @@ Comparing Progress Message Options
6969

7070
----
7171

72+
.. _from_json_option:
73+
7274
``--from-json`` Option
7375
----------------------
7476

@@ -84,6 +86,8 @@ Comparing Progress Message Options
8486

8587
----
8688

89+
.. _max_in_memory_option:
90+
8791
``--max-in-memory`` Option
8892
----------------------------------
8993

@@ -106,6 +110,8 @@ Comparing Progress Message Options
106110

107111
----
108112

113+
.. _max_depth_option:
114+
109115
``--max_depth`` Option
110116
----------------------------------
111117

docs/source/cli-reference/help-text-options.rst

Lines changed: 103 additions & 194 deletions
Large diffs are not rendered by default.

docs/source/cli-reference/list-options.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,9 @@ The sections are as follows:
1515

1616
There's also another section for ``extractcode`` options.
1717

18-
The order of the sections and all their options is the same as in the :ref:'cli_help_text',
18+
The order of the sections and all their options is the same as in the :ref:`cli_help_text`,
1919
available in the command line.
2020

21-
.. include:: /rst_snippets/note_snippets/synopsis_install_quickstart.rst
22-
2321
.. _cli_basic:
2422

2523
.. include:: /rst_snippets/basic_options.rst

docs/source/cli-reference/output-filters-and-control.rst

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.. _cli_output_control:
1+
.. _cli_output_control_filters:
22

33
Controlling Scancode Output and Filters
44
=======================================
@@ -7,10 +7,6 @@ Controlling Scancode Output and Filters
77

88
----
99

10-
.. include:: /rst_snippets/note_snippets/synopsis_install_quickstart.rst
11-
12-
----
13-
1410
``--strip-root`` Vs. ``--full-root``
1511
------------------------------------
1612

@@ -34,10 +30,11 @@ Controlling Scancode Output and Filters
3430

3531
::
3632

37-
"path": "/home/ayansm/Desktop/GSoD/scancode-toolkit-versions/scancode-toolkit-2.2.1/samples/JGroups/LICENSE"
33+
"path": "/home/aboutcode/scancode-toolkit/samples/JGroups/LICENSE"
3834

3935

40-
For the ``--strip-root`` option, the root directory (here ``samples``) is removed from path :
36+
For the ``--strip-root`` option, the root directory (here
37+
``/home/aboutcode/scancode-toolkit/samples/``) is removed from path :
4138

4239
::
4340

docs/source/cli-reference/output-format.rst

Lines changed: 26 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@ following options.
1212

1313
----
1414

15-
.. include:: /rst_snippets/note_snippets/synopsis_install_quickstart.rst
16-
17-
----
18-
1915
.. _output_to_stdout:
2016

2117
.. include:: /rst_snippets/stdout.rst
@@ -38,7 +34,6 @@ following options.
3834

3935
.. figure:: data/json_ugly.png
4036

41-
4237
The entire JSON file is structured in the following manner:
4338

4439
At first some general information on the scan, what options were used, the number of files etc.
@@ -78,8 +73,6 @@ following options.
7873
"path": "samples",
7974
"type": "directory",
8075
...
81-
...
82-
...
8376
"scan_errors": []
8477
},
8578
{
@@ -101,35 +94,23 @@ following options.
10194
"is_media": false,
10295
"is_source": false,
10396
"is_script": false,
104-
"licenses": [],
105-
"license_expressions": [],
97+
"license_detections": [],
98+
"detected_license_expression": None,
99+
"detected_license_expression_spdx": None,
106100
"copyrights": [],
107101
"holders": [],
108102
"authors": [],
109-
"packages": [],
103+
"package_data": [],
104+
"for_packages": [],
110105
"emails": [],
111106
"urls": [],
112107
"files_count": 0,
113108
"dirs_count": 0,
114109
"size_count": 0,
115110
"scan_errors": []
116111
},
112+
{...},
117113
...
118-
...
119-
...
120-
{
121-
"path": "samples/zlib/iostream2/zstream_test.cpp",
122-
"type": "file",
123-
"name": "zstream_test.cpp",
124-
"base_name": "zstream_test",
125-
"extension": ".cpp",
126-
"size": 711,
127-
"date": "2019-02-12",
128-
...
129-
...
130-
...
131-
"scan_errors": []
132-
}
133114
]
134115
}
135116

@@ -169,44 +150,24 @@ following options.
169150
"is_media": false,
170151
"is_source": true,
171152
"is_script": false,
172-
"licenses": [
173-
{
174-
"key": "mit-old-style",
175-
"score": 100.0,
176-
"name": "MIT Old Style",
177-
"short_name": "MIT Old Style",
178-
"category": "Permissive",
179-
"is_exception": false,
180-
"is_unknown": false,
181-
"owner": "MIT",
182-
"homepage_url": "http://fedoraproject.org/wiki/Licensing:MIT#Old_Style",
183-
"text_url": "http://fedoraproject.org/wiki/Licensing:MIT#Old_Style",
184-
"reference_url": "https://enterprise.dejacode.com/urn/urn:dje:license:mit-old-style",
185-
"spdx_license_key": null,
186-
"spdx_url": null,
187-
"start_line": 9,
188-
"end_line": 15,
189-
"matched_rule": {
190-
"identifier": "mit-old-style_cmr-no_1.RULE",
153+
"license_detections": [
154+
"license-expression": "mit-old-style",
155+
"matches": [
156+
{
191157
"license_expression": "mit-old-style",
192-
"licenses": [
193-
"mit-old-style"
194-
],
195-
"is_license_text": true,
196-
"is_license_notice": false,
197-
"is_license_reference": false,
198-
"is_license_tag": false,
158+
"score": 100.0,
159+
"rule_identifier": "mit-old-style_cmr-no_1.RULE",
199160
"matcher": "2-aho",
200161
"rule_length": 71,
201162
"matched_length": 71,
202163
"match_coverage": 100.0,
203164
"rule_relevance": 100
204165
}
205-
}
206-
],
207-
"license_expressions": [
208-
"mit-old-style"
166+
]
167+
"identifier": "mit-old-style-ec759ae0-1234-f138-793e-356789e080c0"
209168
],
169+
"detected_license_expressions": "mit-old-style",
170+
"detected_license_expressions_spdx": "LicenseRef-scancode-mit-old-style",
210171
"copyrights": [
211172
{
212173
"value": "Copyright (c) 1997 Christian Michelsen Research AS Advanced Computing",
@@ -222,7 +183,7 @@ following options.
222183
}
223184
],
224185
"authors": [],
225-
"packages": [],
186+
"package_data": [],
226187
"emails": [],
227188
"urls": [
228189
{
@@ -611,3 +572,12 @@ ____
611572
____
612573

613574
.. include:: /rst_snippets/custom_output_format.rst
575+
576+
..
577+
ToDo:
578+
Document these output options:
579+
580+
--custom-output FILE Write scan output to FILE formatted with the custom
581+
Jinja template file.
582+
--debian FILE Write scan output in machine-readable Debian
583+
copyright format to FILE.

0 commit comments

Comments
 (0)