Root Swift package mirroring PureYAML's structure, rules, and verification gates. Includes the XML node model (Node, Element, Attribute, QualifiedName), a working emitter (Serializer) with escaping and pretty/compact options, and structural validation. The parser surface is stable; parse() raises notImplemented until the scanner lands, pinned by a test. - dependency-free, namespaced under PureXML - portability and style gates carried over (style, namespacing, forbidden patterns, swiftformat, swiftlint, linux, wasm, windows CI) - 11 tests passing
2.3 KiB
2.3 KiB
File Naming Rules
Conventions for naming committed files in the PureXML repo: lowercase, dash-separated, ASCII, ISO dates.
Every file committed must follow these conventions.
General Rules
- Lowercase only: no uppercase letters in filenames.
- Dashes for separators: use
-instead of spaces, underscores, or camelCase. - No spaces: ever.
- No special characters: no accented letters,
(),[],&. Transliterate accented characters to plain ASCII (for example c-with-caron toc, s-with-caron tos, d-with-stroke todj). - No trailing dots: remove dots before the file extension.
- ASCII only: filenames must be plain ASCII.
Date Format in Filenames
Always use ISO format: YYYY-MM-DD
30.11.2023->2023-11-3011.03.2024.->2024-03-11Mar 24, 2025->2025-03-24
Document Naming Patterns
Scanned documents
Scan MMM DD, YYYY at HH.MM.pdf -> scan-YYYY-MM-DD-HH-MM.pdf
Scan DD.MM.YYYY. at HH.MM.pdf -> scan-YYYY-MM-DD-HH-MM.pdf
Scan DD MMM YYYY at HH.MM.pdf -> scan-YYYY-MM-DD-HH-MM.pdf
Photos
IMG_XXXX.jpeg -> keep as-is (acceptable)
IMG_XXXX.HEIC -> convert to IMG_XXXX.jpg (sips)
Photo DD-MM-YYYY.heic -> photo-YYYY-MM-DD.jpg (convert + rename)
Dated documents
<type>-<description>-YYYY-MM-DD.pdf
Use a date suffix only when the document is date-specific; omit it otherwise.
Renaming Existing Files
When renaming, always use git mv to preserve history:
git mv "Old File Name.pdf" "old-file-name.pdf"
Commit: rename: normalize filenames
Audit (before any processing)
Run these in the repo before reporting counts:
# Files with spaces
find <repo> -name "* *" -not -path "*/.git/*" -not -name "*.md"
# Files with uppercase
find <repo> -regex ".*/[^/]*[A-Z][^/]*" -not -path "*/.git/*" -not -name "README*" -not -name "*.md"
# Files with underscores (excluding .git)
find <repo> -name "*_*" -not -path "*/.git/*" -not -name "*.md"
# HEIC files
find <repo> \( -name "*.heic" -o -name "*.HEIC" \) -not -path "*/.git/*"
Skip List
Some asset paths legitimately carry vendor-supplied names and are exempt from the audit. Document the skip paths per repo (for example */webAccessibleResources/*, generated id-document folders, vendor photo dumps). Keep the list short and justified.