ci: check every tracked file against .editorconfig - #60
Merged
Conversation
`.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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
editorconfig-checkerover every git-tracked file, wired into the CI lint job,task ci, and thecheckscript.Why
.editorconfigdeclares 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.yamlcould lose its final newline andformat:check,lintandplatform:validatewould 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 totofu 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.yamlfails 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.