Skip to content

Add CI lint check for DOS (CRLF) line endings#3607

Closed
runlevel5 wants to merge 2 commits into
ptitSeb:mainfrom
runlevel5:ci/crlf-check
Closed

Add CI lint check for DOS (CRLF) line endings#3607
runlevel5 wants to merge 2 commits into
ptitSeb:mainfrom
runlevel5:ci/crlf-check

Conversation

@runlevel5

Copy link
Copy Markdown
Contributor

Summary

  • Convert README.md, docs/CHANGELOG.md, and docs/COMPILE.md from DOS (CRLF) to Unix (LF) line endings
  • Add a new lightweight Lint GitHub Actions workflow (.github/workflows/lint.yml) that detects CRLF line endings in any tracked file and fails the build if found — preventing new CRLF files from being introduced
  • The 31 known legacy CRLF source files are excluded from the check (listed explicitly in the workflow with a reference to this issue)

Ref: #3605

Convert README.md, docs/CHANGELOG.md, and docs/COMPILE.md from
DOS (CRLF) to Unix (LF) line endings to be consistent with the
rest of the codebase.

Ref: ptitSeb#3605
Add a new GitHub Actions workflow that fails if any file (excluding
known legacy CRLF files) has DOS line endings. This prevents new
CRLF files from being introduced into the codebase.

Ref: ptitSeb#3605
@ptitSeb

ptitSeb commented Mar 3, 2026

Copy link
Copy Markdown
Owner

I'm sorry but I fail to see why it's important? Current tooling should be able to handle both LF/CRLF in a transparent way. Do you have tools that doesn't?

@runlevel5

Copy link
Copy Markdown
Contributor Author

I'm sorry but I fail to see why it's important? Current tooling should be able to handle both LF/CRLF in a transparent way. Do you have tools that doesn't?

I reckon to have a rails guard is better than nothing. Since we've already had 31 files that have DOS (CRLF) line endings and whilst many are not might lead to confusion to newcomers, they might create new files with DOS (CRLF). Btw I think it's pretty standardized to have linter or git precommit hook for auto-formatter.

@runlevel5

Copy link
Copy Markdown
Contributor Author

If you find this PR useful, please feel free to re-open and merge it

@runlevel5 runlevel5 closed this Mar 6, 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