-
-
Notifications
You must be signed in to change notification settings - Fork 401
Add pre-commit hook for cleaning up mixed-line endings #2679
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
mergify
merged 12 commits into
haskell:master
from
drsooch:pre-commit-mixed-line-endings
Feb 4, 2022
Merged
Changes from 1 commit
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
2d7d74b
Update pre-commit hook to include changing line endings
drsooch 6b75252
Fix non-lf lines
drsooch 7b9670f
Check pre-commit excludes files
drsooch e33e9de
Revert "Check pre-commit excludes files"
drsooch 8066fbe
Actually add the exclude to contributing docs
drsooch d4a8296
Merge remote-tracking branch 'origin/master' into pre-commit-mixed-li…
drsooch f1a971a
Fix merge failure with previous patch
drsooch fd63c56
Inadvertently overwrote merge
drsooch 16e9c67
Merge branch 'master' into pre-commit-mixed-line-endings
drsooch aa379b9
Add LF option for stylish-haskell and pre-commit file
drsooch 5648ad8
Merge branch 'master' into pre-commit-mixed-line-endings
Anton-Latukha fe3708a
Merge branch 'master' into pre-commit-mixed-line-endings
mergify[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add LF option for stylish-haskell and pre-commit file
- Loading branch information
commit aa379b91c54bd4f0f58a12a112bf6997523f1e51
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"repos": [ | ||
{ | ||
"hooks": [ | ||
{ | ||
"entry": "stylish-haskell --inplace", | ||
"exclude": "(^Setup.hs$|test/testdata/.*$|test/data/.*$|test/manual/lhs/.*$|^hie-compat/.*$|^plugins/hls-tactics-plugin/.*$|^ghcide/src/Development/IDE/GHC/Compat.hs$|^ghcide/src/Development/IDE/Plugin/CodeAction/ExactPrint.hs$|^ghcide/src/Development/IDE/GHC/Compat/Core.hs$|^ghcide/src/Development/IDE/Spans/Pragmas.hs$|^ghcide/src/Development/IDE/LSP/Outline.hs$|^plugins/hls-splice-plugin/src/Ide/Plugin/Splice.hs$|^ghcide/test/exe/Main.hs$|ghcide/src/Development/IDE/Core/Rules.hs|^hls-test-utils/src/Test/Hls/Util.hs$)", | ||
"files": "\\.l?hs$", | ||
"id": "stylish-haskell", | ||
"language": "system", | ||
"name": "stylish-haskell", | ||
"pass_filenames": true, | ||
"types": [ | ||
"file" | ||
] | ||
} | ||
], | ||
"repo": "local" | ||
}, | ||
{ | ||
"repo": "https://github.com/pre-commit/pre-commit-hooks", | ||
"rev": "v4.1.0", | ||
"hooks": [ | ||
{ | ||
"id": "mixed-line-ending", | ||
"args": ["--fix", "lf"], | ||
"exclude": "test/testdata/.*CRLF*.hs$" | ||
} | ||
] | ||
} | ||
] | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,7 +53,7 @@ steps: | |
|
||
columns: 80 | ||
|
||
newline: native | ||
newline: lf | ||
|
||
language_extensions: | ||
- BangPatterns | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way to put the config into nix setting?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't use nix so I have no idea, any help would be appreciative.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nix doesn't support windows so I suppose it is not necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, makes sense.