WordPress / WordPress/WordPress-Coding-Standards
CI: add an xml formatting check for docs files
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 2.8k
- Forks
- 521
- Avg merge
- 5d 20h
- Merged PRs (30d)
- 1
Description
See the conversation here: https://github.com/WordPress/WordPress-Coding-Standards/pull/2334#discussion_r1294579815
Basically we'd need a little (bash or otherwise) script to gather the files in the WordPress/Docs directory and then run the following command against each file with XMLLINT_INDENT set to (four) spaces.
diff -B --tabsize=4 ./WordPress/Docs/Cat/SniffNameStandard.xml <(xmllint --format "./WordPress/Docs/Cat/SniffNameStandard.xml")
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked pull request discussion and inspect the WordPress/Docs directory to determine how its XML files should be gathered. Run the shown xmllint and diff check with XMLLINT_INDENT set to four spaces; the work is done when CI detects incorrectly formatted docs files.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- bash
- Domain
- ci-cd, documentation
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100