PureXML/docs/rules
Mihaela Mihaljevic c6f305357c chore(rules): align lint config and pointer with canonical rules-swift
Make public/rules-swift the canonical source (per project direction) and adopt
its opt-in lint rules that PureXML lacked: empty_count, explicit_init, first_where,
sorted_first_last, unused_import, plus its todo disable. All pass with zero
violations on the existing sources.

PureXML keeps its coherent, stricter tuning where the canon is a self-described
'starting point': force_unwrapping/force_try/force_cast = error (safety), and
trailing commas mandated in both swiftformat (--commas always) and swiftlint
(mandatory_comma) to resolve the canon's formatter-adds vs linter-flags mismatch.
docs/rules/README.md now points at public/rules-swift and documents the tuning.
2026-06-18 20:30:46 +02:00
..
code-style.md chore: scaffold PureXML pure-Swift XML package 2026-06-07 23:20:20 +02:00
commits.md chore: scaffold PureXML pure-Swift XML package 2026-06-07 23:20:20 +02:00
concurrency.md chore: scaffold PureXML pure-Swift XML package 2026-06-07 23:20:20 +02:00
cross-platform.md chore: scaffold PureXML pure-Swift XML package 2026-06-07 23:20:20 +02:00
dependency-injection.md chore: scaffold PureXML pure-Swift XML package 2026-06-07 23:20:20 +02:00
documentation.md chore: scaffold PureXML pure-Swift XML package 2026-06-07 23:20:20 +02:00
engineering.md chore: scaffold PureXML pure-Swift XML package 2026-06-07 23:20:20 +02:00
file-naming.md chore: scaffold PureXML pure-Swift XML package 2026-06-07 23:20:20 +02:00
folder-grouping.md chore: scaffold PureXML pure-Swift XML package 2026-06-07 23:20:20 +02:00
git-discipline.md ci: split workflows for truthful badges and attribution gates 2026-06-08 04:37:32 +02:00
mermaid.md docs(roadmap): add Apple-palette mermaid roadmap and the roadmap gate 2026-06-08 00:58:50 +02:00
namespacing.md chore: scaffold PureXML pure-Swift XML package 2026-06-07 23:20:20 +02:00
package-architecture.md chore: scaffold PureXML pure-Swift XML package 2026-06-07 23:20:20 +02:00
package-structure.md chore: scaffold PureXML pure-Swift XML package 2026-06-07 23:20:20 +02:00
README.md chore(rules): align lint config and pointer with canonical rules-swift 2026-06-18 20:30:46 +02:00
research-first.md docs(rules): research-first rule, consult research repo and literature before guessing 2026-06-15 00:30:01 +02:00
shared-protocols.md chore: scaffold PureXML pure-Swift XML package 2026-06-07 23:20:20 +02:00
systematic-debugging.md chore: scaffold PureXML pure-Swift XML package 2026-06-07 23:20:20 +02:00
testing-discipline.md chore: scaffold PureXML pure-Swift XML package 2026-06-07 23:20:20 +02:00
testing.md chore: scaffold PureXML pure-Swift XML package 2026-06-07 23:20:20 +02:00
verification.md chore: scaffold PureXML pure-Swift XML package 2026-06-07 23:20:20 +02:00

PureXML Rules

Load these rules before changing code:

  • code-style.md
  • namespacing.md
  • cross-platform.md
  • testing.md
  • verification.md
  • commits.md
  • research-first.md

Project-specific overrides:

  • PureXML uses a root Package.swift.
  • Sources live directly under Sources.
  • Tests live in Tests (test target PureXMLTests).
  • Package.swift must keep dependencies: [].
  • Public API must live under the PureXML namespace tree.
  • The package must build on macOS, Linux, Windows, and WASI.
  • Validation coverage gates: docs/validation-coverage-registry.txt (public types), docs/validation-field-registry.txt (document/subject fields), enforced by scripts/check-validation-coverage.sh and scripts/check-validation-fields.sh.

The broader rule files are retained for detailed guidance. When they include generic examples, apply the PureXML-specific overrides above.

Canonical Swift rules live at /Volumes/Code/DeveloperExt/public/rules-swift (especially validation-rules.md and parsing-rules.md). Prefer that source when docs/rules/ copies drift. PureXML's committed .swiftlint.yml and .swiftformat are the coherent project tuning of that canon: they adopt its opt-in rule set and shared formatter directives, keep stricter safety (force_unwrapping/force_try/force_cast = error), and resolve the canon's --commas always vs default-trailing_comma mismatch by mandating trailing commas in both tools.