Skip to content

Commit df08b72

Browse files
Regenerate test expectations for Apache/MIT rule changes
Signed-off-by: Kaushik <[email protected]>
1 parent 9512c29 commit df08b72

File tree

3 files changed

+40
-89
lines changed

3 files changed

+40
-89
lines changed

tests/formattedcode/data/common/manifests-expected.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ headers:
1111
--license-references: yes
1212
--license-text: yes
1313
--package: yes
14+
--processes: -1
1415
--summary: yes
1516
--url: yes
1617
--yaml: <file>
@@ -21,17 +22,17 @@ headers:
2122
for any legal advice.
2223
ScanCode is a free software code scanning tool from nexB Inc. and others.
2324
Visit https://github.com/nexB/scancode-toolkit/ for support and download.
24-
output_format_version: 4.0.0
25+
output_format_version: 4.1.0
2526
message:
2627
errors: []
2728
warnings: []
2829
extra_data:
2930
system_environment:
3031
operating_system: linux
3132
cpu_architecture: 64
32-
platform: Linux-5.15.0-141-generic-x86_64-with-glibc2.35
33-
platform_version: '#151-Ubuntu SMP Sun May 18 21:35:19 UTC 2025'
34-
python_version: 3.10.12 (main, Feb 4 2025, 14:57:36) [GCC 11.4.0]
33+
platform: Linux-6.6.87.2-microsoft-standard-WSL2-x86_64-with-glibc2.39
34+
platform_version: '#1 SMP PREEMPT_DYNAMIC Thu Jun 5 18:30:46 UTC 2025'
35+
python_version: 3.12.3 (main, Jan 8 2026, 11:30:50) [GCC 13.3.0]
3536
spdx_license_list_version: '3.27'
3637
files_count: 4
3738
summary:

tests/formattedcode/data/yaml/package-and-licenses-expected.yaml

Lines changed: 30 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ headers:
1111
--license-references: yes
1212
--license-text: yes
1313
--package: yes
14+
--processes: -1
1415
--summary: yes
1516
--url: yes
1617
--yaml: <file>
@@ -21,17 +22,17 @@ headers:
2122
for any legal advice.
2223
ScanCode is a free software code scanning tool from nexB Inc. and others.
2324
Visit https://github.com/nexB/scancode-toolkit/ for support and download.
24-
output_format_version: 4.0.0
25+
output_format_version: 4.1.0
2526
message:
2627
errors: []
2728
warnings: []
2829
extra_data:
2930
system_environment:
3031
operating_system: linux
3132
cpu_architecture: 64
32-
platform: Linux-5.15.0-141-generic-x86_64-with-glibc2.35
33-
platform_version: '#151-Ubuntu SMP Sun May 18 21:35:19 UTC 2025'
34-
python_version: 3.10.12 (main, Feb 4 2025, 14:57:36) [GCC 11.4.0]
33+
platform: Linux-6.6.87.2-microsoft-standard-WSL2-x86_64-with-glibc2.39
34+
platform_version: '#1 SMP PREEMPT_DYNAMIC Thu Jun 5 18:30:46 UTC 2025'
35+
python_version: 3.12.3 (main, Jan 8 2026, 11:30:50) [GCC 13.3.0]
3536
spdx_license_list_version: '3.27'
3637
files_count: 4
3738
summary:
@@ -47,7 +48,7 @@ summary:
4748
declared_holder: Example Corp.
4849
primary_language: Python
4950
other_license_expressions:
50-
- value: apache-2.0 AND (apache-2.0 OR mit)
51+
- value: apache-2.0 OR mit
5152
count: 1
5253
- value: mit
5354
count: 1
@@ -316,36 +317,23 @@ license_detections:
316317
rule_identifier: apache-2.0_65.RULE
317318
rule_url: https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_65.RULE
318319
matched_text: license = Apache-2.0
319-
- identifier: apache_2_0_and__apache_2_0_or_mit-ab5115d2-1eff-af76-1473-34378a32b2bb
320-
license_expression: apache-2.0 AND (apache-2.0 OR mit)
321-
license_expression_spdx: Apache-2.0 AND (Apache-2.0 OR MIT)
320+
- identifier: apache_2_0_or_mit-63aee60b-3389-cc69-da5a-7dd28d1b8e2e
321+
license_expression: apache-2.0 OR mit
322+
license_expression_spdx: Apache-2.0 OR MIT
322323
detection_count: 1
323324
reference_matches:
324-
- license_expression: apache-2.0
325-
license_expression_spdx: Apache-2.0
326-
from_file: package-and-licenses/README.txt
327-
start_line: 3
328-
end_line: 3
329-
matcher: 2-aho
330-
score: '100.0'
331-
matched_length: 5
332-
match_coverage: '100.0'
333-
rule_relevance: 100
334-
rule_identifier: apache-2.0_1109.RULE
335-
rule_url: https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_1109.RULE
336-
matched_text: This is licensed under Apache-2.0 or MIT
337325
- license_expression: apache-2.0 OR mit
338326
license_expression_spdx: Apache-2.0 OR MIT
339327
from_file: package-and-licenses/README.txt
340328
start_line: 3
341329
end_line: 3
342330
matcher: 2-aho
343331
score: '100.0'
344-
matched_length: 5
332+
matched_length: 7
345333
match_coverage: '100.0'
346334
rule_relevance: 100
347-
rule_identifier: apache-2.0_or_mit_36.RULE
348-
rule_url: https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_or_mit_36.RULE
335+
rule_identifier: apache-2.0_or_mit_55.RULE
336+
rule_url: https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_or_mit_55.RULE
349337
matched_text: This is licensed under Apache-2.0 or MIT
350338
- identifier: mit-cacd5c0c-204a-85c2-affc-e4c125b2492a
351339
license_expression: mit
@@ -356,7 +344,7 @@ license_detections:
356344
license_expression_spdx: MIT
357345
from_file: package-and-licenses/mit.LICENSE
358346
start_line: 2
359-
end_line: '19'
347+
end_line: 19
360348
matcher: 1-hash
361349
score: '100.0'
362350
matched_length: 161
@@ -846,33 +834,6 @@ license_rule_references:
846834
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
847835
See the License for the specific language governing permissions and
848836
limitations under the License.
849-
- license_expression: apache-2.0
850-
identifier: apache-2.0_1109.RULE
851-
language: en
852-
rule_url: https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_1109.RULE
853-
is_license_text: no
854-
is_license_notice: yes
855-
is_license_reference: no
856-
is_license_tag: no
857-
is_license_intro: no
858-
is_license_clue: no
859-
is_required_phrase: no
860-
skip_for_required_phrase_generation: no
861-
is_continuous: no
862-
is_builtin: yes
863-
is_from_license: no
864-
is_synthetic: no
865-
length: 5
866-
relevance: 100
867-
minimum_coverage: 80
868-
referenced_filenames: []
869-
notes:
870-
ignorable_copyrights: []
871-
ignorable_holders: []
872-
ignorable_authors: []
873-
ignorable_urls: []
874-
ignorable_emails: []
875-
text: licenced under {{Apache 2.0}}
876837
- license_expression: apache-2.0
877838
identifier: apache-2.0_65.RULE
878839
language: en
@@ -901,22 +862,22 @@ license_rule_references:
901862
ignorable_emails: []
902863
text: license="Apache-2.0
903864
- license_expression: apache-2.0 OR mit
904-
identifier: apache-2.0_or_mit_36.RULE
865+
identifier: apache-2.0_or_mit_55.RULE
905866
language: en
906-
rule_url: https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_or_mit_36.RULE
867+
rule_url: https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_or_mit_55.RULE
907868
is_license_text: no
908869
is_license_notice: no
909870
is_license_reference: yes
910871
is_license_tag: no
911872
is_license_intro: no
912873
is_license_clue: no
913-
is_required_phrase: yes
874+
is_required_phrase: no
914875
skip_for_required_phrase_generation: no
915876
is_continuous: no
916877
is_builtin: yes
917878
is_from_license: no
918879
is_synthetic: no
919-
length: 5
880+
length: 7
920881
relevance: 100
921882
minimum_coverage: 80
922883
referenced_filenames: []
@@ -926,7 +887,8 @@ license_rule_references:
926887
ignorable_authors: []
927888
ignorable_urls: []
928889
ignorable_emails: []
929-
text: apache-2.0 OR MIT
890+
text: |
891+
licensed under Apache-2.0 OR MIT
930892
- license_expression: mit
931893
identifier: mit.LICENSE
932894
language: en
@@ -1069,39 +1031,26 @@ files:
10691031
package_data: []
10701032
for_packages:
10711033
- pkg:pypi/codebase?uuid=fixed-uid-done-for-testing-5642512d1758
1072-
detected_license_expression: apache-2.0 AND (apache-2.0 OR mit)
1073-
detected_license_expression_spdx: Apache-2.0 AND (Apache-2.0 OR MIT)
1034+
detected_license_expression: apache-2.0 OR mit
1035+
detected_license_expression_spdx: Apache-2.0 OR MIT
10741036
license_detections:
1075-
- license_expression: apache-2.0 AND (apache-2.0 OR mit)
1076-
license_expression_spdx: Apache-2.0 AND (Apache-2.0 OR MIT)
1037+
- license_expression: apache-2.0 OR mit
1038+
license_expression_spdx: Apache-2.0 OR MIT
10771039
matches:
1078-
- license_expression: apache-2.0
1079-
license_expression_spdx: Apache-2.0
1080-
from_file: package-and-licenses/README.txt
1081-
start_line: 3
1082-
end_line: 3
1083-
matcher: 2-aho
1084-
score: '100.0'
1085-
matched_length: 5
1086-
match_coverage: '100.0'
1087-
rule_relevance: 100
1088-
rule_identifier: apache-2.0_1109.RULE
1089-
rule_url: https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_1109.RULE
1090-
matched_text: This is licensed under Apache-2.0 or MIT
10911040
- license_expression: apache-2.0 OR mit
10921041
license_expression_spdx: Apache-2.0 OR MIT
10931042
from_file: package-and-licenses/README.txt
10941043
start_line: 3
10951044
end_line: 3
10961045
matcher: 2-aho
10971046
score: '100.0'
1098-
matched_length: 5
1047+
matched_length: 7
10991048
match_coverage: '100.0'
11001049
rule_relevance: 100
1101-
rule_identifier: apache-2.0_or_mit_36.RULE
1102-
rule_url: https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_or_mit_36.RULE
1050+
rule_identifier: apache-2.0_or_mit_55.RULE
1051+
rule_url: https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_or_mit_55.RULE
11031052
matched_text: This is licensed under Apache-2.0 or MIT
1104-
identifier: apache_2_0_and__apache_2_0_or_mit-ab5115d2-1eff-af76-1473-34378a32b2bb
1053+
identifier: apache_2_0_or_mit-63aee60b-3389-cc69-da5a-7dd28d1b8e2e
11051054
license_clues: []
11061055
percentage_of_license_text: '50.0'
11071056
copyrights:
@@ -1324,8 +1273,8 @@ files:
13241273
start_line: 4
13251274
end_line: 4
13261275
- url: http://www.apache.org/licenses/LICENSE-2.0
1327-
start_line: '196'
1328-
end_line: '196'
1276+
start_line: 196
1277+
end_line: 196
13291278
files_count: '0'
13301279
dirs_count: '0'
13311280
size_count: '0'
@@ -1368,7 +1317,7 @@ files:
13681317
license_expression_spdx: MIT
13691318
from_file: package-and-licenses/mit.LICENSE
13701319
start_line: 2
1371-
end_line: '19'
1320+
end_line: 19
13721321
matcher: 1-hash
13731322
score: '100.0'
13741323
matched_length: 161

tests/formattedcode/data/yaml/simple-expected.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ headers:
66
--info: yes
77
--license: yes
88
--package: yes
9+
--processes: -1
910
--yaml: <file>
1011
notice: |
1112
Generated with ScanCode and provided on an "AS IS" BASIS, WITHOUT WARRANTIES
@@ -14,17 +15,17 @@ headers:
1415
for any legal advice.
1516
ScanCode is a free software code scanning tool from nexB Inc. and others.
1617
Visit https://github.com/nexB/scancode-toolkit/ for support and download.
17-
output_format_version: 4.0.0
18+
output_format_version: 4.1.0
1819
message:
1920
errors: []
2021
warnings: []
2122
extra_data:
2223
system_environment:
2324
operating_system: linux
2425
cpu_architecture: 64
25-
platform: Linux-5.15.0-141-generic-x86_64-with-glibc2.35
26-
platform_version: '#151-Ubuntu SMP Sun May 18 21:35:19 UTC 2025'
27-
python_version: 3.10.12 (main, Feb 4 2025, 14:57:36) [GCC 11.4.0]
26+
platform: Linux-6.6.87.2-microsoft-standard-WSL2-x86_64-with-glibc2.39
27+
platform_version: '#1 SMP PREEMPT_DYNAMIC Thu Jun 5 18:30:46 UTC 2025'
28+
python_version: 3.12.3 (main, Jan 8 2026, 11:30:50) [GCC 13.3.0]
2829
spdx_license_list_version: '3.27'
2930
files_count: 1
3031
packages: []

0 commit comments

Comments
 (0)