docs: add conservative EditorConfig defaults #1955

Closed
leonida/mandy
j-weiner wants to merge 0 commits from docs/editorconfig-baseline into main

Pull request closed

This pull request cannot be reopened because the branch was deleted.

j-weiner commented 2026-11-25 16:41:11 +00:00

Claimed in the coordination issue as: DOC-EDITORCONFIG-BASELINE

What and why

Adds a repository-root .editorconfig with UTF-8, LF, final-newline and trailing-whitespace defaults; CRLF overrides for .ps1, .cmd, .bat and .sln match .gitattributes. Markdown trailing spaces remain intact for hard line breaks. Two existing C++ tests with UTF-8 BOMs are explicitly preserved. No existing files are reformatted and no indentation or formatter policy is introduced.

Tested

  • python3 -I tests/test_text_write_line_endings.py — 3 passed.
  • python3 -I scripts/check_no_game_data.py .editorconfig — clean.
  • Verified both BOM-specific source files begin with UTF-8 BOM bytes.
  • git diff --check — passed.

GPUs tested: n/a (configuration-only; no GPU test was run).

AI-assisted: yes.

Checklist

  • Rebased on current main and merges cleanly.
  • One topic: EditorConfig defaults.
  • No game data, keys or decryption.
  • No translator rule change (not applicable).
Claimed in the coordination issue as: [DOC-EDITORCONFIG-BASELINE](https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7168323004) ### What and why Adds a repository-root `.editorconfig` with UTF-8, LF, final-newline and trailing-whitespace defaults; CRLF overrides for `.ps1`, `.cmd`, `.bat` and `.sln` match `.gitattributes`. Markdown trailing spaces remain intact for hard line breaks. Two existing C++ tests with UTF-8 BOMs are explicitly preserved. No existing files are reformatted and no indentation or formatter policy is introduced. ### Tested - `python3 -I tests/test_text_write_line_endings.py` — 3 passed. - `python3 -I scripts/check_no_game_data.py .editorconfig` — clean. - Verified both BOM-specific source files begin with UTF-8 BOM bytes. - `git diff --check` — passed. GPUs tested: n/a (configuration-only; no GPU test was run). AI-assisted: yes. ### Checklist - [x] Rebased on current `main` and merges cleanly. - [x] One topic: EditorConfig defaults. - [x] No game data, keys or decryption. - [x] No translator rule change (not applicable).
MSedgeMC reviewed 2026-11-25 17:13:48 +00:00
MSedgeMC left a comment
No description provided.
This PR adds a .editorconfig, but PR #1956 also adds one and is more complete: it mirrors .gitattributes (LF default; CRLF for .ps1/.cmd/.bat/.sln), preserves Markdown's two-space hard breaks, and ignores generated navmesh-decode.json output. #1956 also lacks the two BOM entries here; please check whether those two test files actually carry a UTF-8 BOM and fold any necessary entries into whichever .editorconfig lands. Two PRs adding the same new file will conflict.
MSedgeMC reviewed 2026-11-25 17:14:16 +00:00
MSedgeMC left a comment
No description provided.
Correction to my previous comment: I checked the two files and both DO carry a UTF-8 BOM (first bytes ef bb bf), so the charset=utf-8-bom entries here are legitimate and not covered by PR #1956. The two PRs still both create .editorconfig and will conflict, so the maintainer should merge one and fold in the other's entries: #1956 has the complete line-ending mirror of .gitattributes plus the Markdown trailing-space rule and navmesh ignore; this PR has the two necessary BOM exceptions. No objection to the content.
j-weiner commented 2026-11-25 17:30:00 +00:00

Rebased onto current main (fe1553456) and resolved the EditorConfig feedback: this file now mirrors .gitattributes for LF/CRLF, preserves Markdown hard breaks, and retains the two verified UTF-8-BOM exceptions. It covers the EditorConfig defaults in #1956 plus those BOM-specific entries. Since both PRs add .editorconfig, please coordinate which one lands to avoid a duplicate-file conflict; the checks on this branch pass.

Rebased onto current `main` (`fe1553456`) and resolved the EditorConfig feedback: this file now mirrors `.gitattributes` for LF/CRLF, preserves Markdown hard breaks, and retains the two verified UTF-8-BOM exceptions. It covers the EditorConfig defaults in #1956 plus those BOM-specific entries. Since both PRs add `.editorconfig`, please coordinate which one lands to avoid a duplicate-file conflict; the checks on this branch pass.
j-weiner commented 2026-11-25 17:33:22 +00:00

Rebased again onto current main (b0e11f234). The .editorconfig remains a superset of the formatting rules in #1956 and preserves the two verified BOM exceptions. test_text_write_line_endings.py (3 passed), check_no_game_data.py .editorconfig (clean), and git diff --check pass. I asked #1956 to drop its duplicate .editorconfig hunk so the generated-output hygiene change can remain separate; no changes were made to that PR.

Rebased again onto current `main` (`b0e11f234`). The `.editorconfig` remains a superset of the formatting rules in #1956 and preserves the two verified BOM exceptions. `test_text_write_line_endings.py` (3 passed), `check_no_game_data.py .editorconfig` (clean), and `git diff --check` pass. I asked #1956 to drop its duplicate `.editorconfig` hunk so the generated-output hygiene change can remain separate; no changes were made to that PR.
j-weiner commented 2026-11-25 17:44:01 +00:00

Closing as a duplicate of #1956 to avoid two open PRs adding .editorconfig. I asked #1956 to add the two BOM exceptions unique to this PR; its branch already carries the broader line-ending, Markdown, and generated-output changes.

Closing as a duplicate of #1956 to avoid two open PRs adding `.editorconfig`. I asked #1956 to add the two BOM exceptions unique to this PR; its branch already carries the broader line-ending, Markdown, and generated-output changes.
Sign in to join this conversation.
No description provided.