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
1.4 KiB
1.4 KiB
Contributing to PureXML
Thanks for your interest in PureXML.
By participating you agree to the Code of Conduct.
Project Shape
PureXML is a root Swift package:
PureXML/
├── Package.swift
├── Sources/
├── Tests/
├── docs/
└── scripts/
Do not create a Packages/ folder for this repo.
Rules
- Pure Swift only.
- No external SwiftPM dependencies.
- No C-backed parser target in the public package.
- Every public type lives under the
PureXMLnamespace tree. - Build and test on macOS, Linux, and WASI.
Setup
git config core.hooksPath .githooks
swift build
swift test
Install SwiftFormat and SwiftLint if they are not already available:
brew install swiftformat swiftlint
Verification
Before opening a PR or saying a change is ready, run:
bash scripts/check-style.sh
bash scripts/check-namespacing.sh
swiftformat . --config .swiftformat --lint
swiftlint --config .swiftlint.yml --strict
swift build
swift test
Commits
Use Conventional Commits:
<type>(<scope>): summary
Examples:
feat(parser): add element start-tag scanningtest(emitter): cover attribute escapingci(wasm): add wasi build gate
Do not include AI attribution. Do not use em dashes.
License
By contributing, you agree that your contributions are licensed under the project's MIT license.