Skip to content

docs: add conservative EditorConfig defaults - #1955

Closed
j-weiner wants to merge 2 commits into
ProjectLeonida:mainfrom
j-weiner:docs/editorconfig-baseline
Closed

j-weiner wants to merge 2 commits into
ProjectLeonida:mainfrom
j-weiner:docs/editorconfig-baseline

Conversation

@j-weiner

@j-weiner j-weiner commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

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).

@MSedgeMC MSedgeMC left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 MSedgeMC left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
j-weiner force-pushed the docs/editorconfig-baseline branch from 3e8634d to d8cbb21 Compare November 25, 2026 17:29
@j-weiner

Copy link
Copy Markdown
Contributor Author

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

Copy link
Copy Markdown
Contributor Author

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
j-weiner force-pushed the docs/editorconfig-baseline branch from 49753fc to b99cca1 Compare November 25, 2026 17:36
@j-weiner
j-weiner force-pushed the docs/editorconfig-baseline branch from b99cca1 to 5562c1e Compare November 25, 2026 17:39
@j-weiner

Copy link
Copy Markdown
Contributor Author

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 j-weiner closed this Nov 25, 2026
BubsMcgee added a commit to BubsMcgee/leonida that referenced this pull request Nov 25, 2026
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.

2 participants