Problem
Every tracked file follows a consistent set of formatting conventions, but nothing in the repository records them. The conventions are held by habit rather than by a rule an editor can read, so the first contributor whose editor defaults differ will introduce mixed indentation or CRLF line endings without anything contradicting it.
Evidence
The ten tracked files were inspected byte by byte in this session:
| Property |
Observed |
| Line endings |
LF in all ten files; zero CRLF sequences |
| Tabs |
none in any file |
Indentation (src/**/*.java) |
spaces only, in multiples of four |
Trailing whitespace (src/**/*.java) |
none |
Trailing whitespace (LICENSE) |
present on three lines |
| Encoding |
ASCII throughout, except LICENSE, which contains a UTF-8 copyright sign |
| Final newline |
present in README.md, LICENSE, and .gitignore; absent from all seven .java files |
No compiler was required to establish any of the above.
Proposed change
An .editorconfig at the repository root recording the properties that hold uniformly: end_of_line = lf and charset = utf-8 for all files, plus indent_style = space, indent_size = 4, and trim_trailing_whitespace = true scoped to *.java.
Two properties are deliberately handled narrowly:
trim_trailing_whitespace is scoped to *.java rather than applied globally, because LICENSE violates it on three lines.
insert_final_newline is left unset entirely, because the seven .java files disagree with the other three tracked files.
Setting either one globally would make the file describe an intention rather than the repository, and would cause a conforming editor to rewrite files that such a change is not meant to touch.
Why this is proportionate
No source file is modified, and no dependency, build file, or top-level directory is introduced. The addition is a single configuration file of roughly ten lines, which is appropriate for a project of this size.
This issue was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener).
drafted by Claude on behalf of Daniel Stephenson
Problem
Every tracked file follows a consistent set of formatting conventions, but nothing in the repository records them. The conventions are held by habit rather than by a rule an editor can read, so the first contributor whose editor defaults differ will introduce mixed indentation or CRLF line endings without anything contradicting it.
Evidence
The ten tracked files were inspected byte by byte in this session:
src/**/*.java)src/**/*.java)LICENSE)LICENSE, which contains a UTF-8 copyright signREADME.md,LICENSE, and.gitignore; absent from all seven.javafilesNo compiler was required to establish any of the above.
Proposed change
An
.editorconfigat the repository root recording the properties that hold uniformly:end_of_line = lfandcharset = utf-8for all files, plusindent_style = space,indent_size = 4, andtrim_trailing_whitespace = truescoped to*.java.Two properties are deliberately handled narrowly:
trim_trailing_whitespaceis scoped to*.javarather than applied globally, becauseLICENSEviolates it on three lines.insert_final_newlineis left unset entirely, because the seven.javafiles disagree with the other three tracked files.Setting either one globally would make the file describe an intention rather than the repository, and would cause a conforming editor to rewrite files that such a change is not meant to touch.
Why this is proportionate
No source file is modified, and no dependency, build file, or top-level directory is introduced. The addition is a single configuration file of roughly ten lines, which is appropriate for a project of this size.
This issue was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener).
drafted by Claude on behalf of Daniel Stephenson