diff --git a/.cspell.json b/.cspell.json index a4ee15961..8917d5a21 100644 --- a/.cspell.json +++ b/.cspell.json @@ -91,11 +91,13 @@ "vcard", "WHATWG", "wcag", + "webgpu", "webidl", "webperf", "webrtc", "Whut", - "wrongprocess" + "wrongprocess", + "WGSL" ], "dictionaries": ["html", "js", "css", "npm", "en-gb"], "ignorePaths": [ diff --git a/lib/exceptions.json b/lib/exceptions.json index 76e9081c7..2cba7e587 100644 --- a/lib/exceptions.json +++ b/lib/exceptions.json @@ -29,5 +29,11 @@ { "rule": "sotd.candidate-review-end" } + ], + "^webgpu|WGSL$": [ + { + "rule": "headers.dl", + "message": "Implementation report" + } ] } diff --git a/lib/rules/headers/dl.js b/lib/rules/headers/dl.js index 829d489a1..4f39d004f 100644 --- a/lib/rules/headers/dl.js +++ b/lib/rules/headers/dl.js @@ -39,7 +39,8 @@ export const name = self.name; */ function checkLink({ sr, rule = self, element, linkName, mustHave = true }) { if (!element || !element.href) { - if (mustHave) sr.error(rule, 'not-found', { linkName }); + if (mustHave) + sr.error(rule, 'not-found', { linkName, message: linkName }); return false; } const text = sr.norm(element.textContent).trim(); diff --git a/lib/validator.js b/lib/validator.js index 7a8372c5d..9dc9cfd77 100644 --- a/lib/validator.js +++ b/lib/validator.js @@ -199,8 +199,9 @@ Specberus.prototype.error = function (rule, key, extra) { let name; if (typeof rule === 'string') name = rule; else name = rule.name; + const shortname = this.getShortname(); if ( - this.shortname !== undefined && + shortname !== undefined && this.exceptions.has(this.shortname, name, key, extra) ) this.warning(rule, key, extra); @@ -448,7 +449,7 @@ Specberus.prototype.getEditorIDs = function () { return result; }; -Specberus.prototype.getShortname = async function () { +Specberus.prototype.getShortname = function () { if (undefined !== this.shortname) { return this.shortname; }