You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/source/api-and-outputs/json-output.rst
+48-31Lines changed: 48 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,13 @@
1
1
JSON Output Format
2
2
==================
3
3
4
-
`scancode-results-analyzer` is meant to be used as a post-scan Plugin for Scancode, where after
4
+
`scancode-analyzer` is meant to be used as a post-scan Plugin for Scancode, where after
5
5
running a scan, the scan results are then analyzed for scan errors, and that information is
6
6
added to the scancode JSON results.
7
7
8
-
Command Line Argument to use ``scancode-results-analyzer``: ``--analyze-license-results``
8
+
Command Line Argument to use ``scancode-analyzer``: ``--analyze-license-results``
9
9
10
-
Here's how example result-JSONs from `scancode-results-analyzer` could look like, post-analysis.
10
+
Here's how example result-JSONs from `scancode-analyzer` could look like, post-analysis.
11
11
12
12
.. _license_detection_issues_result_json:
13
13
@@ -23,13 +23,6 @@ for each resource in the codebase this list of dictionary will be added, where e
23
23
is for each corresponding file-region :ref:`file_region`, having the results of the analysis for all
24
24
the match(es) in that file-region.
25
25
26
-
.. note::
27
-
28
-
[WIP]
29
-
There would also be a codebase-level dictionary added,
30
-
1. With statistics on the license_detection issues.
31
-
2. All the unique license detection issues and their occurrences.
32
-
3. Header information.
33
26
34
27
.. code-block:: json
35
28
@@ -110,6 +103,7 @@ a file-region, and containing analysis results for all the license matches in a
110
103
"is_license_notice": true,
111
104
"is_license_tag": false,
112
105
"is_license_reference": false,
106
+
"is_license_intro": false,
113
107
"analysis_confidence": "high",
114
108
"is_suggested_matched_text_complete": true
115
109
},
@@ -159,6 +153,9 @@ location.
159
153
"licenses": [
160
154
{
161
155
"key": "lgpl-2.0"
156
+
},
157
+
{
158
+
"key": "gpl-3.0-plus"
162
159
}
163
160
],
164
161
"licence_detection_issues": [
@@ -174,13 +171,19 @@ location.
174
171
"is_license_notice": true,
175
172
"is_license_tag": false,
176
173
"is_license_reference": false,
174
+
"is_license_intro": false,
177
175
"analysis_confidence": "medium",
178
176
"is_suggested_matched_text_complete": true
179
177
},
180
178
"suggested_license": {
181
179
"license_expression": "lgpl-2.0-plus",
182
180
"matched_text": " * licensed under the terms of the LGPL.... "
183
-
}
181
+
},
182
+
"original_licenses": [
183
+
{
184
+
"key": "lgpl-2.0"
185
+
}
186
+
]
184
187
},
185
188
{
186
189
"start_line": 54,
@@ -194,14 +197,19 @@ location.
194
197
"is_license_notice": true,
195
198
"is_license_tag": false,
196
199
"is_license_reference": false,
200
+
"is_license_intro": false,
197
201
"analysis_confidence": "high",
198
202
"is_suggested_matched_text_complete": true
199
203
},
200
204
"suggested_license": {
201
205
"license_expression": "gpl-3.0-plus",
202
206
"matched_text": "\"genshellopt is free software: you can redistribute it and/or modify it under \\\nthe terms of the GNU General Public License as published by the Free Software \\\nFoundation, either version 3 of the License, or (at your option) any later \\\nversion."
203
207
},
204
-
"original_licenses": []
208
+
"original_licenses": [
209
+
{
210
+
"key": "gpl-3.0-plus"
211
+
}
212
+
]
205
213
}
206
214
]
207
215
}
@@ -260,6 +268,7 @@ it is an empty list.
260
268
"is_license_notice": true,
261
269
"is_license_tag": false,
262
270
"is_license_reference": false,
271
+
"is_license_intro": false,
263
272
"analysis_confidence": "medium",
264
273
"is_suggested_matched_text_complete": true
265
274
},
@@ -304,13 +313,19 @@ it is an empty list.
304
313
"is_license_notice": true,
305
314
"is_license_tag": false,
306
315
"is_license_reference": false,
316
+
"is_license_intro": false,
307
317
"analysis_confidence": "medium",
308
318
"is_suggested_matched_text_complete": true
309
319
},
310
320
"suggested_license": {
311
321
"license_expression": "lgpl-2.0-plus",
312
322
"matched_text": " * licensed under the terms of the LGPL. "
313
-
}
323
+
},
324
+
"original_licenses": [
325
+
{
326
+
"key": "unknown"
327
+
}
328
+
]
314
329
}
315
330
]
316
331
}
@@ -336,22 +351,24 @@ All Unique License Detection Issues
336
351
337
352
.. code-block:: json
338
353
339
-
"unique_license_detection_issues": [
340
-
{
341
-
"unique_identifier": 1,
342
-
"files": [
343
-
{
344
-
"path": "1921-socat-2.0.0-error.h",
345
-
"start_line": 3,
346
-
"end_line": 3
354
+
{
355
+
"unique_license_detection_issues": [
356
+
{
357
+
"unique_identifier": 1,
358
+
"files": [
359
+
{
360
+
"path": "1921-socat-2.0.0-error.h",
361
+
"start_line": 3,
362
+
"end_line": 3
363
+
}
364
+
],
365
+
"license_detection_issue": {
366
+
"issue_category": "imperfect-match-coverage",
367
+
"issue_description": "The license detection is inconclusive with high confidence, because only a small part of the rule text is matched."
347
368
}
348
-
],
349
-
"license_detection_issue": {
350
-
"issue_category": "imperfect-match-coverage",
351
-
"issue_description": "The license detection is inconclusive with high confidence, because only a small part of the rule text is matched."
0 commit comments