Skip to content

Commit e1aa2ba

Browse files
feat(CSAF2.1): #287 add recommended test 6.2.44 - improve messages and name of variables
1 parent e2cae8f commit e1aa2ba

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

csaf_2_1/recommendedTests/recommendedTest_6_2_44.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ const DEPRECATED_SPDX_LICENSE_KEYS = new Set(
4141
const validateSchema = ajv.compile(inputSchema)
4242

4343
/**
44-
* Check whether the license identifiers ref is a deprecated Aboutcode's license
44+
* Check whether the license identifiers ref is a deprecated AboutCode's license
45+
* Ignores other license inventorying entities
4546
* @param {string} licenseRefToCheck
4647
* @return {boolean}
4748
*/
@@ -133,13 +134,13 @@ export function recommendedTest_6_2_44(doc) {
133134
const licenseToCheck = doc.document.license_expression
134135

135136
if (validate(licenseToCheck).valid) {
136-
const deprecatedLicenseIdentifier =
137+
const deprecatedLicenseIdentifiers =
137138
allDeprecatedInLicenseString(licenseToCheck)
138139

139-
deprecatedLicenseIdentifier.forEach((licenseKey) => {
140+
deprecatedLicenseIdentifiers.forEach((licenseKey) => {
140141
ctx.warnings.push({
141142
instancePath: '/document/license_expression',
142-
message: `License identifier ${licenseKey} is deprecated `,
143+
message: `License identifier ${licenseKey} is deprecated `,
143144
})
144145
})
145146
}

0 commit comments

Comments
 (0)