ietf-tools / idnits

Library / CLI to inspect Internet-Draft documents for a variety of conditions to conform with IETF policies.
BSD 3-Clause "New" or "Revised" License
12 stars 16 forks source link

BCP 14 boilerplate detection #44

Open martinthomson opened 1 month ago

martinthomson commented 1 month ago
 7  Error
 └- Code - MISSING_REQLEVEL_REF
 └- Desc - An RFC2119 boilerplate is present but no reference to the RFC2119 was found.
 └- Ref  - https://www.rfc-editor.org/rfc/rfc7322.html#section-4.8.2

That's a an understandable error, but one that could be fixed.

I'm using kramdown-rfc's {::boilerplate bcp14-tagged-bcp}.

rjsparks commented 1 month ago

Hi Martin - please clarify what change you're looking for?

martinthomson commented 1 month ago

Sure, I was a bit terse...

The boilerplate in question looks like this:

      <t>The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL
NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
"<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as
described in BCP¤14 <xref target="BCP14"/> when, and only when, they
appear in all capitals, as shown here.</t>

Presumably, this should be detected as acceptable.

There are a few interesting quirks to this:

These are all variations that should be tolerated.