Skip to content

Add .editorconfig, a CI check that fails on CRLF, and ruff line-endin… - #1495

Merged
VisLab merged 1 commit into
hed-standard:mainfrom
VisLab:standardize
Nov 5, 2026
Merged

VisLab merged 1 commit into
hed-standard:mainfrom
VisLab:standardize

Conversation

@VisLab

@VisLab VisLab commented Nov 5, 2026

Copy link
Copy Markdown
Member

…g = lf

.editorconfig sets LF, a final newline, trimmed trailing whitespace, and UTF-8 for every file, including the gitignored working files that .gitattributes never sees. The CI workflow now fails when any tracked text file reaches a commit with CRLF or mixed line endings. ruff format writes LF instead of keeping whatever ending a file already had, so the formatter can no longer preserve a CRLF file on Windows.

…g = lf

.editorconfig sets LF, a final newline, trimmed trailing whitespace, and
UTF-8 for every file, including the gitignored working files that
.gitattributes never sees. The CI workflow now fails when any tracked text
file reaches a commit with CRLF or mixed line endings. ruff format writes
LF instead of keeping whatever ending a file already had, so the formatter
can no longer preserve a CRLF file on Windows.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@VisLab
VisLab requested a balanced review from Copilot November 5, 2026 20:42
@VisLab VisLab added documentation An error in the documentation or something is missing maintenance required-update labels Nov 5, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues remain for the changes standardizing LF line endings.

No open issues 🎉

What changed in this PR

This PR standardizes LF line endings across editor settings, Python formatting, and CI in hed-python.

Changes:

  • Add repository-wide EditorConfig defaults, including for gitignored working files.
  • Add a CI check that rejects tracked CRLF or mixed-line-ending files, excluding files marked -text.
  • Configure Ruff to write LF line endings rather than preserve existing endings.
File Description
pyproject.toml Set Ruff's formatter to use LF line endings.
.github/​workflows/​ci.yaml Check committed line endings after checkout.
.editorconfig Set LF, UTF-8, final-newline, and trailing-whitespace defaults.

Review effort: Balanced

@VisLab
VisLab merged commit c272896 into hed-standard:main Nov 5, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation An error in the documentation or something is missing maintenance required-update

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants