Skip to content

Commit 3a74d8b

Browse files
feat(CSAF2.1): #287 add mandatory test 6.1.42 - improve messages and name of variables
1 parent 3851c14 commit 3a74d8b

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

csaf_2_1/mandatoryTests/mandatoryTest_6_1_42.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,10 @@ export function checkPurls(purls) {
119119
* @type {Array<PackageURL>}
120120
*/
121121
if (packageUrls.length > 1) {
122-
const firstPurls = packageUrls[0]
122+
const firstPurl = packageUrls[0]
123123
for (let i = 1; i < packageUrls.length; i++) {
124124
const packageUrl = packageUrls[i]
125-
if (!packageUrl || !onlyDifferInQualifiers(firstPurls, packageUrl)) {
125+
if (!packageUrl || !onlyDifferInQualifiers(firstPurl, packageUrl)) {
126126
invalidPurls.push(i)
127127
}
128128
}
@@ -190,7 +190,8 @@ export function mandatoryTest_6_1_42(doc) {
190190
ctx.isValid = false
191191
ctx.errors.push({
192192
instancePath: `${prefix}/product_identification_helper/purls/${invalidPurlIndex}`,
193-
message: 'the PURL differs to the first PURL not only in qualifiers',
193+
message:
194+
'the PURL differs from the first PURL in other parts than just the qualifiers',
194195
})
195196
})
196197
}
@@ -211,7 +212,8 @@ export function mandatoryTest_6_1_42(doc) {
211212
ctx.isValid = false
212213
ctx.errors.push({
213214
instancePath: `${prefix}/product/product_identification_helper/purls/${invalidPurlIndex}`,
214-
message: 'the PURL differs to the first PURL not only in qualifiers',
215+
message:
216+
'the PURL differs from the first PURL in other parts than just the qualifiers',
215217
})
216218
})
217219
branch.branches?.forEach((branch, index) => {

0 commit comments

Comments
 (0)