legible
Three build gates for defects a linter has no opinion about, because none of them is a syntax error. Type too small to read, color that cannot be read on its own background, and a name that should be gone.
What it does
Three build gates for defects a linter has no opinion about, because none of them is a syntax error. Each one exists because a person read something and could not.
pip install legible typefloor ./src type below a readable floor contrast-gate ./src color that cannot be read on its surface deadname-gate ./src a name that should be gone
The rename gate is the unusual one
It fails a build when a retired name reaches a title, a footer, a byline, alt text or a comment — while leaving machine identifiers alone, because renaming a repository path or a published artifact breaks working links or contradicts a deposited record. Both halves matter. A gate that cannot tell those apart gets switched off within a week.
Written for a company rename. It is the same shape as the problem of a person changing their name and finding it in three hundred places, which is the harder version and the one worth getting right.
It will not tell you it passed when it did not
All three once reported OK on a directory they had never
opened, because a bare path argument was ignored and each scanned itself
instead. deadname-gate exits 2 rather than 0 when
nothing is configured, and contrast-gate --require-pairs fails
rather than passing a stylesheet that declares no colors at all.
How it works
- Install it, or add the Action
pip install legiblelocally, or drop one of the four Actions into a workflow. - Point it at a directory
typefloor ./src,contrast-gate ./src,deadname-gate ./src. Exceptions live in a JSON file rather than suppressed inline, so what you allowed is one list you can read. - Let it fail the buildThat is the point. A warning nobody reads is the same as no check at all.
The three gates
--require-pairs also fails a file that declares no pairs at all, because a vacuous pass looks exactly like a real one.Specifications
| Install | pip install legible |
|---|---|
| License | MIT |
| Commands | typefloor, contrast-gate, deadname-gate |
| Actions | typefloor, contrast-gate, deadname-gate, cvd-palette |
| Source | vince-gonzalez/f-keys |
Questions
- Why not just use a linter?
- A linter checks syntax. None of these three are syntax errors — they are things a person could not read, which no parser has an opinion about.
- Will it fight my existing style rules?
- No. It only asserts the three things above, and every exception is recorded in a file rather than scattered through the source.
- Do I have to use all three?
- No. They are separate commands and separate Actions.