Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

idnits v3 #27

Draft
wants to merge 64 commits into
base: v2
Choose a base branch
from
Draft

idnits v3 #27

wants to merge 64 commits into from

Conversation

NGPixel
Copy link
Member

@NGPixel NGPixel commented May 18, 2023

Conditions to check for any input type

  • Control characters other than CR, NL, or FF appear (0x01-0x09,0x0b,0x0e-0x1f)
  • Byte sequences that are not valid UTF-8 appear
  • Non-ASCII UTF-8 appear (comment will point to guidance in draft-flanagan-nonascii)
  • Missing Abstract section
    • Text
    • XML
  • Missing Introduction section
    • Text
    • XML
  • Missing Security Considerations section
    • Text
    • XML
  • Missing Author Address section
    • Text
    • XML
  • References (if any present) are not categorized as Normative or Informative
    • Text
    • XML
  • Abstract contains references
    • Text
    • XML
  • FQDN appears (other than www.ietf.org) not meeting RFC2606/RFC6761 recommendations
    • Text
    • XML
  • Private IPv4 address appears that doesn't meet RFC5735 recommendations
    • Text
    • XML
  • Multicast IPv4 address appears that doesn't meet RFC5771/RFC6676 recommendations
    • Text
    • XML
  • Other IPv4 address appears that doesn't meet RFC5735 recommendations
    • Text
    • XML
  • Unique Local IPv6 address appears that doesn't meet RFC3849/RFC4291 recommendations
    • Text
    • XML
  • Link Local IPv6 address appears that doesn't meet RFC3849/RFC4291 recommendations
    • Text
    • XML
  • Other IPv6 address appears that doesn't meet RFC3849/RFC4291 recommendations
    • Text
    • XML
  • A possible code comment is detected outside of a marked code block
  • 2119 keywords occur, but neither the matching boilerplate nor a reference to 2119 is missing
    • Text
    • XML
  • 2119 keywords occur, a reference to 2119 exists, but matching boilerplate is missing
    • Text
    • XML
  • 2119 boilerplate is present, but document doesn't use 2119 keywords
    • Text
    • XML
  • badly formed combination of 2119 words occurs (MUST not, SHALL not, SHOULD not, not RECOMMENDED, MAY NOT, NOT REQUIRED, NOT OPTIONAL)
    • Text
    • XML
  • text similar to 2119 boilerplate occurs, but doesn't reference 2119
    • Text
    • XML
  • NOT RECOMMENDED appears, but is not included in 2119-like boilerplate
    • Text
    • XML
  • Common terms are incorrectly spelled or use the wrong casing
    • Text
    • XML
  • Abstract doesn't directly state it updates or obsoletes each document so affected (Additional comment if Abstract mentions the document some other way)
    • Text
    • XML
  • Abstract states it updates or obsoletes a document not declared in the relevant field previously
    • Text
    • XML
  • Author's address section title misuses possessive mark or uses a character other than a single quote
  • a reference is declared, but not used in the document
  • a reference appears to be a downref (noting if reference appears in the downref registry)
  • a normative reference to an document of unknown status appears (possible downref)
  • a normative or unclassified reference is to an obsolete document
  • an informative reference is to an obsolete document
  • a reference is to a draft that has already been published as an rfc
  • A code-block is detected, but the block does not contain a license declaration

Filename checks

  • filename's base name contains characters other than digits, lowercase alpha, and dash
  • filename's extension doesn't match format type (.txt, .xml)
  • filename's base name doesn't match the name declared in the document
    • Text
    • XML
  • filename (including extension) is more than 50 characters

Metadata checks

  • Document claims to obsolete an RFC that is already obsolete
    • Text
    • XML
  • Document claims to update and RFC that is obsolete
    • Text
    • XML
  • Document's status or intended status is not found or not recognized
    • Text
    • XML
  • Document's date can't be determined or is too far in the past or the future (see existing implementation for "too far")
    • Text
    • XML

If the document is an RFC

  • Missing IANA considerations section
    • Text
    • XML

If the document is an Internet-Draft (that is, not an RFC)

  • filename's base name doesn't begin with 'draft', contains two consecutive hyphens, or doesn't have enough structure to contain the individual or stream, potentially a wg name, and a distinguishing name. (draft-example-00 is an error, but draft-example-filename is acceptable)
  • Missing IANA considerations section
    • Text
    • XML

Additional metadata check

  • version of document is unexpected (already exists, or leaves a gap)
    • Text
    • XML

XML Input Specific Conditions

  • any deprecated elements or attributes appear
  • metadata and document's 'submissionType' attribute state different streams
  • The text inside a <sourcecode> tag contains the string <CODE BEGINS> (Warn that the string is unnecessary and may duplicate what a presentation format converter will produce.)
  • The text inside any other tag contains the string <CODE BEGINS> (Warn that if the text is a code block, it should appear in a <sourcecode> element)
  • text occurs that looks like a text-document reference (e.g. [1], or [RFC...) (if the text was really a reference it should be in an <eref> tag)
  • <rfc> ipr attribute is missing or not recognized
  • ipr attribute is not one of "trust200902", "noModificationTrust200902", "noDerivativesTrust200902", or "pre5378Trust200902"
  • document is ietf stream and ipr attribute is one of "noModificationTrust200902" or "noDerivativesTrust200902"

Boilerplate checks

  • The text inside any tag sufficiently matches any of the boilerplate in the IETF-TLP-4 section 6a-6d (such text should probably be removed and the ipr attribute of the rfc tag should be verified)
  • The value of the <rfc> autogeneratedBoilerplateText, if non-empty, does not match what the ipr attribute would cause to be generated

Text Input Specific Conditions

  • document does not appear to be ragged-right (more than 50 lines of intra-line extra spacing)
  • document contains over-long lines (cut-off is 72 characters. Report longest line, and count of long lines)
  • document has hyphenated line-breaks
  • Updates or Obsoletes line on first page has more than just numbers of RFCs (such as the the character sequence 'RFC')
  • Document starts with PK or BM
  • document appears to use numeric references, but contains something that looks like a text-style reference (or vice-versa)
  • a string that looks like a reference appears but does not occur in any reference section
  • Abstract section is numbered
  • 'Status of this memo' section is numbered
  • Copyright Notice section is numbered

Boilerplate checks

  • TLP-4 6.b.i copyright line is not present
  • TLP-4 6.b.i copyright date is not this (or command-line specified) year
  • TLP-4 6.b.i or b.ii license notice is not present, or doesn't match stream IETF stream document sufficiently matches TLP-4 6.c.i or 6.c.ii text (restrictions on publication or derivative works)
  • More than one instance of text sufficiently matching the TLP-4 6.b.i copyright line occurs
  • More than one instance of text sufficiently matching either the TLP4 6.b.i or 6.b.ii license notice occurs
  • Document obsoletes or updates any pre-5378 document, and doesn't contain the pre-5378 material of TLP4 6.c.iii
  • Any prior version of the document might be pre-5378 and the document doesn't contain the pre-5378 material of TLP4 6.c.iii

If the document is an Internet-Draft (i.e not an RFC)

  • contains over-long pages
  • report count of pages with more than 58 lines
  • doesn't say INTERNET DRAFT in the upper left of the first page
  • doesn't have expiration date on first and last page
  • doesn't have an acceptable paragraph noting that IDs are working documents
  • doesn't have an acceptable paragraph calling out 6 month validity
  • doesn't have an acceptable paragraph pointing to the list of current ids
  • has multiple occurrences of current id text
  • document name doesn't appear on first page
  • has more than 15 pages and not Table of Contents
  • IPR disclosure text (TLP 4.0 6.a) does not appear
  • IPR disclosure text (TLP 4.0 6.a) appears after first page
  • pages are not separated by formfeeds
  • FORMFEED and [Page occur on a line, possibly separated by spaces (indicates NROFF post-processing wasn't successful)
  • section title occurs at an unexpected indentation

@NGPixel NGPixel self-assigned this May 18, 2023
NGPixel and others added 27 commits May 17, 2023 22:36
* feat: modified txt parser

* feat: added missing introduction section validation

- changed validation functions. Now they use already parsed data
- rewrote test for validators
* feat: modified txt parser

* feat: added missing introduction section validation

- changed validation functions. Now they use already parsed data
- rewrote test for validators

* feat: added missing security section validatioin

- changed validation functions. Now they use already parsed data
- wrote test for validators

* feat: added missing author section validation

- changed validation functions. Now they use already parsed data
- wrote tests for validators

---------

Co-authored-by: Nicolas Giard <[email protected]>
* feat: modified txt parser

* feat: added missing introduction section validation

- changed validation functions. Now they use already parsed data
- rewrote test for validators

* feat: added missing security section validatioin

- changed validation functions. Now they use already parsed data
- wrote test for validators

---------

Co-authored-by: Nicolas Giard <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants