docs: add conservative EditorConfig defaults #1955

Closed
github-bot wants to merge 2 commits from gh-pr/1955/head into gh-pr/1955/base
Owner

@⁠j-weiner on GitHub · 2026-11-25 16:41 UTC · original
j-weiner:docs/editorconfig-baseline → main · +31 −0 · 1 files · 2 commits · closed without merging

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).
**@⁠j-weiner** on GitHub · 2026-11-25 16:41 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1955) `j-weiner:docs/editorconfig-baseline` → `main` · +31 −0 · 1 files · 2 commits · closed without merging Claimed in the coordination issue as: [DOC-EDITORCONFIG-BASELINE](https://git.gtahub.st/github/ubiquitarianism--leonida/issues/1608) ### 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).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 10:12:44 +00:00
github-bot closed this pull request 2026-11-26 10:12:44 +00:00
Author
Owner

@⁠MSedgeMC on GitHub · 2026-11-25 17:13 UTC · original · reviewed

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** on GitHub · 2026-11-25 17:13 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1955#pullrequestreview-6061859998) · **reviewed** 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.
Author
Owner

@⁠MSedgeMC on GitHub · 2026-11-25 17:14 UTC · original · reviewed

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.

**@⁠MSedgeMC** on GitHub · 2026-11-25 17:14 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1955#pullrequestreview-6061866637) · **reviewed** 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.
Author
Owner

@⁠j-weiner on GitHub · 2026-11-25 17:30 UTC · original

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** on GitHub · 2026-11-25 17:30 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1955#issuecomment-7169591195) 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.
Author
Owner

@⁠j-weiner on GitHub · 2026-11-25 17:33 UTC · original

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** on GitHub · 2026-11-25 17:33 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1955#issuecomment-7169671280) 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.
Author
Owner

@⁠j-weiner on GitHub · 2026-11-25 17:44 UTC · original

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.

**@⁠j-weiner** on GitHub · 2026-11-25 17:44 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1955#issuecomment-7169922243) 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.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.