Commit 1895ef43 authored by David Sveningsson's avatar David Sveningsson

feat(rules): use annotated name

parent 979da571
Pipeline #103239571 passed with stages
in 9 minutes and 1 second
......@@ -52,7 +52,7 @@ class ElementPermittedContent extends Rule {
if (!Validator.validatePermitted(cur, rules)) {
this.report(
cur,
`Element <${cur.tagName}> is not permitted as content in <${parent.tagName}>`
`Element <${cur.tagName}> is not permitted as content in ${parent.annotatedName}`
);
return true;
}
......@@ -83,7 +83,7 @@ class ElementPermittedContent extends Rule {
) {
this.report(
node,
`Element <${node.tagName}> is not permitted as descendant of <${parent.tagName}>`
`Element <${node.tagName}> is not permitted as descendant of ${parent.annotatedName}`
);
return true;
}
......
......@@ -40,7 +40,7 @@ class ElementPermittedOccurrences extends Rule {
) {
this.report(
node,
`Element <${node.tagName}> can only appear once under <${parent.tagName}>`
`Element <${node.tagName}> can only appear once under ${parent.annotatedName}`
);
}
});
......
......@@ -36,7 +36,7 @@ class ElementRequiredAttributes extends Rule<Context> {
this.report(
node,
`<${node.tagName}> is missing required "${key}" attribute`,
`${node.annotatedName} is missing required "${key}" attribute`,
node.location,
context
);
......
......@@ -42,7 +42,7 @@ class ElementRequiredContent extends Rule<Context> {
};
this.report(
node,
`<${node.tagName}> element must have <${missing}> as content`,
`${node.annotatedName} element must have <${missing}> as content`,
null,
context
);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment