Skip to content

LI(23)P62014r2: Add EditorConfig and reformat ASN.1 and XML

Luke Mewburn requested to merge draft/LI62-P62014r2-cleanup into meeting/LI62

Provide .editorconfig file to enable consistent style in future edits:

  • Globally, use UNIX-style formatting:
    • UNIX linefeed for end of line
    • Ensure files have a trailing newline.
  • For .asn, .asn1, .xml, and .xsd extensions:
    • 4 space indents (not tab).
    • Trim trailing whitespace.

Reformat .asn, .xml, and .xml files, which involved no non-whitespace changes:

  • Expand tabs to 4 spaces, and ensure SEQUENCE/CHOICE fields line up (e.g., if the file previously used 8 character wide tab indents).
  • No trailing whitespaces.

Reformat .xml and .xml files using env XMLLINT_INDENT=" " xmllint --encode UTF-8 --format FILENAME.xml which resulted in changes:

  • Ensure the <xml ...> header has encoding="UTF-8".
  • <xs:schema ...> collapsed to one line and some attribute reordered.
  • Empty tags are converted to self-closing tags. E.g. <xs:element name="Name" type="Type"></xs:element:> becomes <xs:element name="Name" type="Type"/>.
  • Some xmlns related attributes are reordered.

Merge request reports