Skip to content

Commit cdca561

Browse files
authored
Fix some issue reported by JET (#244)
1 parent e55210e commit cdca561

File tree

5 files changed

+10
-7
lines changed

5 files changed

+10
-7
lines changed

src/Aqua.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ function test_all(
7878
end
7979
@testset "Compare Project.toml and test/Project.toml" begin
8080
if project_extras !== false
81-
test_project_extras(testtarget; askwargs(project_extras)...)
81+
isempty(askwargs(project_extras)) || error("Keyword arguments not supported")
82+
test_project_extras(testtarget)
8283
end
8384
end
8485
@testset "Stale dependencies" begin

src/ambiguities.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ function _find_ambiguities(
145145
strerr,
146146
)
147147

148-
parse(Int, reg_match.captures[1])
148+
parse(Int, reg_match.captures[1]::AbstractString)
149149
end
150150
return num_ambiguities, strout, strerr
151151
end

src/deps_compat.jl

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ function test_deps_compat(
3333
)
3434
if check_julia !== false
3535
@testset "julia" begin
36-
test_julia_compat(pkg; askwargs(check_julia)...)
36+
isempty(askwargs(check_julia)) || error("Keyword arguments not supported")
37+
test_julia_compat(pkg)
3738
end
3839
end
3940
@testset "$pkg deps" begin
@@ -71,11 +72,11 @@ function test_deps_compat(mod::Module; kwargs...)
7172
test_deps_compat(aspkgid(mod); kwargs...)
7273
end
7374

74-
function test_julia_compat(pkg::PkgId; broken::Bool = false, kwargs...)
75+
function test_julia_compat(pkg::PkgId; broken::Bool = false)
7576
if broken
76-
@test_broken has_julia_compat(pkg; kwargs...)
77+
@test_broken has_julia_compat(pkg)
7778
else
78-
@test has_julia_compat(pkg; kwargs...)
79+
@test has_julia_compat(pkg)
7980
end
8081
end
8182

src/pkg/Versions.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ function isjoinable(up::VersionBound, lo::VersionBound)
9494
return true
9595
end
9696

97-
Base.hash(r::VersionBound, h::UInt) = hash(hash(r.t, h), r.n)
97+
Base.hash(r::VersionBound, h::UInt) = hash(r.t, hash(r.n, h))
9898

9999
# Hot code
100100
function VersionBound(s::AbstractString)

src/stale_deps.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ function _analyze_stale_deps_1(pkg::PkgId; ignore::AbstractVector{Symbol} = Symb
6868
output = read(`$cmd --startup-file=no --color=no -e $code`, String)
6969
@debug("Checked modules loaded in a separate process.", cmd, Text(code), Text(output))
7070
pos = findfirst(marker, output)
71+
@assert !isnothing(pos)
7172
output = output[pos.stop+1:end]
7273
loaded_uuids = map(UUID, eachline(IOBuffer(output)))
7374

0 commit comments

Comments
 (0)