Skip to content

Commit b4ab6ef

Browse files
Merge pull request #44228 from JuliaLang/sk/nbsp
- replace non-breaking spaces with plain spaces - use only UNIX line endings (\n) - end text files with single newlines - rewrite whitespace checks in Julia & check for: - trailing non-ASCII whitespace - non-breaking spaces anywhere - non-UNIX line endings - missing trailing newline
2 parents 2d34539 + b07b5ba commit b4ab6ef

145 files changed

Lines changed: 429 additions & 279 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.mailmap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,4 +282,4 @@ Daniel Karrasch <[email protected]> <[email protected]>
282282
283283

284284
285-
285+

HISTORY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4102,7 +4102,7 @@ Library improvements
41024102
41034103
+ Using colons (`:`) to represent a collection of indices is deprecated. They now must be
41044104
explicitly converted to a specialized array of integers with the `to_indices` function.
4105-
   As a result, the type of `SubArray`s that represent views over colon indices has changed.
4105+
As a result, the type of `SubArray`s that represent views over colon indices has changed.
41064106
41074107
+ Logical indexing is now more efficient. Logical arrays are converted by `to_indices` to
41084108
a lazy, iterable collection of indices that doesn't support indexing. A deprecation

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ docs-revise:
9999

100100
check-whitespace:
101101
ifneq ($(NO_GIT), 1)
102-
@$(JULIAHOME)/contrib/check-whitespace.sh
102+
@$(JULIAHOME)/contrib/check-whitespace.jl
103103
else
104104
$(warn "Skipping whitespace check because git is unavailable")
105105
endif
@@ -472,7 +472,7 @@ endif
472472

473473
# Include all git-tracked filenames
474474
git ls-files >> light-source-dist.tmp
475-
475+
476476
# Include documentation filenames
477477
find doc/_build/html >> light-source-dist.tmp
478478

base/abstractset.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ issetequal(a::AbstractSet, b) = issetequal(a, Set(b))
434434
function issetequal(a, b::AbstractSet)
435435
if haslength(a)
436436
# check b for too many unique elements
437-
length(a) < length(b) && return false
437+
length(a) < length(b) && return false
438438
end
439439
return issetequal(Set(a), b)
440440
end

base/array.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ the `value` that was passed; this means that if the `value` is itself modified,
452452
all elements of the `fill`ed array will reflect that modification because they're
453453
_still_ that very `value`. This is of no concern with `fill(1.0, (5,5))` as the
454454
`value` `1.0` is immutable and cannot itself be modified, but can be unexpected
455-
with mutable values like — most commonly — arrays. For example, `fill([], 3)`
455+
with mutable values like — most commonly — arrays. For example, `fill([], 3)`
456456
places _the very same_ empty array in all three locations of the returned vector:
457457
458458
```jldoctest

base/gmp.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -736,7 +736,7 @@ function digits!(a::AbstractVector{T}, n::BigInt; base::Integer = 10) where {T<:
736736
i, j = firstindex(a)-1, length(s)+1
737737
lasti = min(lastindex(a), firstindex(a) + length(s)-1 - isneg(n))
738738
while i < lasti
739-
# base ≤ 36: 0-9, plus a-z for 10-35
739+
# base ≤ 36: 0-9, plus a-z for 10-35
740740
# base > 36: 0-9, plus A-Z for 10-35 and a-z for 36..61
741741
x = s[j -= 1]
742742
a[i += 1] = base 36 ? (x>0x39 ? x-0x57 : x-0x30) : (x>0x39 ? (x>0x60 ? x-0x3d : x-0x37) : x-0x30)

base/indices.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ A linear indexing style uses one integer index to describe the position in the a
2323
(even if it's a multidimensional array) and column-major
2424
ordering is used to efficiently access the elements. This means that
2525
requesting [`eachindex`](@ref) from an array that is `IndexLinear` will return
26-
a simple one-dimensional range, even if it is multidimensional.
26+
a simple one-dimensional range, even if it is multidimensional.
2727
2828
A custom array that reports its `IndexStyle` as `IndexLinear` only needs
2929
to implement indexing (and indexed assignment) with a single `Int` index;
30-
all other indexing expressions — including multidimensional accesses — will
30+
all other indexing expressions — including multidimensional accesses — will
3131
be recomputed to the linear index. For example, if `A` were a `2×3` custom
3232
matrix with linear indexing, and we referenced `A[1, 3]`, this would be
3333
recomputed to the equivalent linear index and call `A[5]` since `2*1 + 3 = 5`.
@@ -50,13 +50,13 @@ a range of [`CartesianIndices`](@ref).
5050
5151
A `N`-dimensional custom array that reports its `IndexStyle` as `IndexCartesian` needs
5252
to implement indexing (and indexed assignment) with exactly `N` `Int` indices;
53-
all other indexing expressions — including linear indexing — will
53+
all other indexing expressions — including linear indexing — will
5454
be recomputed to the equivalent Cartesian location. For example, if `A` were a `2×3` custom
5555
matrix with cartesian indexing, and we referenced `A[5]`, this would be
5656
recomputed to the equivalent Cartesian index and call `A[1, 3]` since `5 = 2*1 + 3`.
5757
5858
It is significantly more expensive to compute Cartesian indices from a linear index than it is
59-
to go the other way. The former operation requires division — a very costly operation — whereas
59+
to go the other way. The former operation requires division — a very costly operation — whereas
6060
the latter only uses multiplication and addition and is essentially free. This asymmetry means it
6161
is far more costly to use linear indexing with an `IndexCartesian` array than it is to use
6262
Cartesian indexing with an `IndexLinear` array.

base/missing.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,4 +463,3 @@ macro coalesce(args...)
463463
end
464464
return esc(:(let val; $expr; end))
465465
end
466-

base/pkgid.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,3 @@ function binunpack(s::String)
4242
name = read(io, String)
4343
return PkgId(UUID(uuid), name)
4444
end
45-

base/randomdevice.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,4 +74,4 @@ function _make_uint_seed()
7474
catch
7575
return _ad_hoc_entropy() % Cuint
7676
end
77-
end
77+
end

0 commit comments

Comments
 (0)