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. |
||
|---|---|---|
| .. | ||
| code-style.md | ||
| commits.md | ||
| concurrency.md | ||
| cross-platform.md | ||
| dependency-injection.md | ||
| documentation.md | ||
| engineering.md | ||
| file-naming.md | ||
| folder-grouping.md | ||
| git-discipline.md | ||
| mermaid.md | ||
| namespacing.md | ||
| package-architecture.md | ||
| package-structure.md | ||
| README.md | ||
| research-first.md | ||
| shared-protocols.md | ||
| systematic-debugging.md | ||
| testing-discipline.md | ||
| testing.md | ||
| verification.md | ||
PureXML Rules
Load these rules before changing code:
code-style.mdnamespacing.mdcross-platform.mdtesting.mdverification.mdcommits.mdresearch-first.md
Project-specific overrides:
- PureXML uses a root
Package.swift. - Sources live directly under
Sources. - Tests live in
Tests(test targetPureXMLTests). Package.swiftmust keepdependencies: [].- Public API must live under the
PureXMLnamespace 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 byscripts/check-validation-coverage.shandscripts/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.