web-platform-tests / web-platform-tests/rfcs
FR: Establish a default python formatter / linter and enforce it via CI
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 110
- Forks
- 90
- PR merge metrics
- No merged PRs in 30d
Description
Note: Originally copied / imported from https://github.com/web-platform-tests/wpt/issues/42710. We'll keep the other bug open to track the implementation side of this FR.
So long as we do not agree on a default formatter for this repository, back-end-forth diff noise and bikeshedding keeps coming up (e.g.).
It would be the best to everyone, and for improved devex, to agree to use one and only one formatter.
Additionally, to ensure it sticks, we should add some CI job to enforce that no violations are introduced.
The status quo (at least within the realm of WebDriver BiDi) seems to be the following:
- Google / Chromium and the Chromium BiDi Mapper use
yapf v0.31.0. - Mozilla / Firefox uses
black.
The following AIs should happen:
- agree on which formatter to use:
yapf,black, or something else? - globally format the codebase using it
- add a (non-optional?) CI check to enforce it
Resources:
cc @juliandescottes @past
Contributor guide
No contributing guide indexed for this repository
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 by reviewing the linked WPT issue, the referenced pull-request discussion, and the yapf and black resources. Done means the project agrees on one formatter, the codebase is formatted with it, and CI enforces that new violations are not introduced.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- ci-cd, developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100