-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
replace non-breaking spaces with plain spaces #44228
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
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
3903fa5
whitespace: end text files with single newlines
StefanKarpinski e66bfa5
whitespace: use only UNIX line endings (\n)
StefanKarpinski 100a741
whitespace: replace non-breaking space => space
StefanKarpinski b07b5ba
whitespace check: rewrite in Julia, add checks
StefanKarpinski 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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -282,4 +282,4 @@ Daniel Karrasch <[email protected]> <[email protected]> | |
| Daniel Karrasch <[email protected]> <[email protected]> | ||
|
|
||
| Roger Luo <[email protected]> <[email protected]> | ||
| Roger Luo <[email protected]> <[email protected]> | ||
| Roger Luo <[email protected]> <[email protected]> | ||
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
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
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
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 |
|---|---|---|
|
|
@@ -463,4 +463,3 @@ macro coalesce(args...) | |
| end | ||
| return esc(:(let val; $expr; end)) | ||
| end | ||
|
|
||
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 |
|---|---|---|
|
|
@@ -42,4 +42,3 @@ function binunpack(s::String) | |
| name = read(io, String) | ||
| return PkgId(UUID(uuid), name) | ||
| end | ||
|
|
||
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 |
|---|---|---|
|
|
@@ -74,4 +74,4 @@ function _make_uint_seed() | |
| catch | ||
| return _ad_hoc_entropy() % Cuint | ||
| end | ||
| end | ||
| end | ||
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
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
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
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
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,55 @@ | ||
| #!/usr/bin/env julia | ||
|
|
||
| const patterns = split(""" | ||
| *.1 | ||
| *.c | ||
| *.cpp | ||
| *.h | ||
| *.inc | ||
| *.jl | ||
| *.lsp | ||
| *.make | ||
| *.md | ||
| *.mk | ||
| *.rst | ||
| *.scm | ||
| *.sh | ||
| *.yml | ||
| *Makefile | ||
| """) | ||
|
|
||
| const errors = Set{Tuple{String,Int,String}}() | ||
|
|
||
| for path in eachline(`git ls-files -- $patterns`) | ||
| lineno = 0 | ||
| non_blank = 0 | ||
|
|
||
| file_err(msg) = push!(errors, (path, 0, msg)) | ||
| line_err(msg) = push!(errors, (path, lineno, msg)) | ||
|
|
||
| for line in eachline(path, keep=true) | ||
| lineno += 1 | ||
| contains(line, '\r') && file_err("non-UNIX line endings") | ||
| contains(line, '\ua0') && line_err("non-breaking space") | ||
| endswith(line, '\n') || line_err("no trailing newline") | ||
| line = chomp(line) | ||
| endswith(line, r"\s") && line_err("trailing whitespace") | ||
| contains(line, r"\S") && (non_blank = lineno) | ||
| end | ||
| non_blank < lineno && line_err("trailing blank lines") | ||
| end | ||
|
|
||
| if isempty(errors) | ||
| println(stderr, "Whitespace check found no issues.") | ||
| exit(0) | ||
| else | ||
| println(stderr, "Whitespace check found $(length(errors)) issues:") | ||
| for (path, lineno, msg) in sort!(collect(errors)) | ||
| if lineno == 0 | ||
| println(stderr, "$path -- $msg") | ||
| else | ||
| println(stderr, "$path:$lineno -- $msg") | ||
| end | ||
| end | ||
| exit(1) | ||
| end | ||
This file was deleted.
Oops, something went wrong.
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 |
|---|---|---|
|
|
@@ -160,4 +160,3 @@ for lib in libopenblas libcholmod liblapack $SONAMES; do | |
| done | ||
| done | ||
| done | ||
|
|
||
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 |
|---|---|---|
|
|
@@ -65,4 +65,4 @@ | |
| "version" : 1, | ||
| "author" : "xcode" | ||
| } | ||
| } | ||
| } | ||
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 |
|---|---|---|
|
|
@@ -3,4 +3,4 @@ | |
| "version" : 1, | ||
| "author" : "xcode" | ||
| } | ||
| } | ||
| } | ||
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 |
|---|---|---|
|
|
@@ -28,4 +28,4 @@ Readme\ | |
| \f2 \cb2 $HOME | ||
| \f1 \cb1 usually expands to | ||
| \f2 \cb2 /Users/username | ||
| \f1 \cb1 ).} | ||
| \f1 \cb1 ).} | ||
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.