Skip to content

ci: check every tracked file against .editorconfig - #60

Merged
stxkxs merged 1 commit into
mainfrom
chore/editorconfig-gate
Aug 6, 2026
Merged

ci: check every tracked file against .editorconfig#60
stxkxs merged 1 commit into
mainfrom
chore/editorconfig-gate

Conversation

@stxkxs

@stxkxs stxkxs commented Aug 6, 2026

Copy link
Copy Markdown
Member

What

Adds editorconfig-checker over every git-tracked file, wired into the CI lint job, task ci, and the check script.

Why

.editorconfig declares charset, LF line endings, a final newline and no trailing whitespace for the whole repo. Biome formats TypeScript and JSON, so those rules held across part of the tree and were observed nowhere else — YAML, HCL, Markdown and shell ran on the honour system.

Concretely: platform.yaml could lose its final newline and format:check, lint and platform:validate would all pass.

Which checks, and why not the rest

Kept: charset, end-of-line, insert-final-newline, trim-trailing-whitespace.

Indentation and indent-size are disabled. Go answers to gofmt, Terraform to tofu fmt, TypeScript and JSON to biome, and a Makefile needs tabs for recipes and spaces for the continuation lines inside them. A second opinion there either contradicts the authoritative formatter or demands churn for a rule nothing else asks for. This gate takes the four rules no other tool owns.

Negative-tested

A stripped final newline on platform.yaml fails the gate; the unmodified tree passes; the restore is byte-identical.

Day-one cost

None. The tree is already clean under these rules, so this goes green without a reformatting commit.

`.editorconfig` declares charset, LF line endings, a final newline and no
trailing whitespace for every file in the repo. Biome formats TypeScript
and JSON, so those rules held across part of the tree and were observed
nowhere else — YAML, HCL, Markdown and shell were on the honour system.
A tenant's `platform.yaml` could lose its final newline and every gate
would pass.

Adds `editorconfig-checker` over all git-tracked files, wired into the CI
lint job, the local `task ci`, and the `check` script so the same command
runs in all three places.

Indentation checks stay off. Go answers to gofmt, Terraform to tofu fmt,
TypeScript and JSON to biome, and a Makefile needs tabs for its recipes
and spaces for the continuation lines inside them. A second opinion there
would either contradict the authoritative formatter or demand churn to
satisfy a rule nothing else asks for, so this gate takes the four rules
no other tool owns.

Negative-tested: a stripped final newline fails the gate and the
unmodified tree passes.
@stxkxs
stxkxs merged commit c092e38 into main Aug 6, 2026
14 checks passed
@stxkxs
stxkxs deleted the chore/editorconfig-gate branch August 6, 2026 06:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant