Skip to content

Commit 0c6ec9f

Browse files
authored
Check for CRLF line endings in CI (#1348)
## The problem We currently don't have any checks to ensure that we don't use CRLF line endings, which could result in hard-to-detect issues in our files, as the difference between LF and CRLF isn't always visible ## The solution In this PR, we now check that all files that are not binary do not contain CRLF line endings. This PR does the following: - Adds a `pre-commit` rule to ensure that files that text files don't have CRLF - Fixes all files in our repo that had CRLF line endings; looks like we had only missed one file - Removes an old Rope database file that was floating around in our repo for some reason. Seemed better to remove it than add a rule for it to our new `.gitattributes` - Throws an exception in test case recorder when developer tries to record a test with line endings as CRLF ## References - https://adaptivepatchwork.com/2012/03/01/mind-the-end-of-your-line/ - https://docs.github.com/en/get-started/getting-started-with-git/configuring-git-to-handle-line-endings - https://git-scm.com/docs/gitattributes ## Checklist - [ ] I have added [tests](https://www.cursorless.org/docs/contributing/test-case-recorder/) - [ ] I have updated the [docs](https://github.com/cursorless-dev/cursorless/tree/main/docs) and [cheatsheet](https://github.com/cursorless-dev/cursorless/tree/main/cursorless-talon/src/cheatsheet) - [ ] I have not broken the cheatsheet - [x] Make sure we're checking line endings for files in CI
1 parent 33340b4 commit 0c6ec9f

File tree

2 files changed

+0
-123
lines changed

2 files changed

+0
-123
lines changed

.vscode/.ropeproject/config.py

Lines changed: 0 additions & 123 deletions
This file was deleted.

.vscode/.ropeproject/objectdb

-6 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)