PureXML/CONTRIBUTING.md
Mihaela Mihaljevic 708390242c chore: scaffold PureXML pure-Swift XML package
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
2026-06-07 23:20:20 +02:00

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 PureXML namespace 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 scanning
  • test(emitter): cover attribute escaping
  • ci(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.