Skip to content

Commit

Permalink
Fix some issue reported by JET
Browse files Browse the repository at this point in the history
  • Loading branch information
lgoettgens committed Nov 16, 2023
1 parent 4c28668 commit 80f38d4
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
3 changes: 2 additions & 1 deletion src/Aqua.jl
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ function test_all(
end
@testset "Compare Project.toml and test/Project.toml" begin
if project_extras !== false
test_project_extras(testtarget; askwargs(project_extras)...)
isempty(askwargs(project_extras)) || error("Keyword arguments not supported")
test_project_extras(testtarget)
end
end
@testset "Stale dependencies" begin
Expand Down
2 changes: 1 addition & 1 deletion src/ambiguities.jl
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ function _find_ambiguities(
strerr,
)

parse(Int, reg_match.captures[1])
parse(Int, reg_match.captures[1]::AbstractString)
end
return num_ambiguities, strout, strerr
end
Expand Down
9 changes: 5 additions & 4 deletions src/deps_compat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ function test_deps_compat(
)
if check_julia !== false
@testset "julia" begin
test_julia_compat(pkg; askwargs(check_julia)...)
isempty(askwargs(check_julia)) || error("Keyword arguments not supported")
test_julia_compat(pkg)
end
end
@testset "$pkg deps" begin
Expand Down Expand Up @@ -71,11 +72,11 @@ function test_deps_compat(mod::Module; kwargs...)
test_deps_compat(aspkgid(mod); kwargs...)
end

function test_julia_compat(pkg::PkgId; broken::Bool = false, kwargs...)
function test_julia_compat(pkg::PkgId; broken::Bool = false)
if broken
@test_broken has_julia_compat(pkg; kwargs...)
@test_broken has_julia_compat(pkg)

Check warning on line 77 in src/deps_compat.jl

View check run for this annotation

Codecov / codecov/patch

src/deps_compat.jl#L77

Added line #L77 was not covered by tests
else
@test has_julia_compat(pkg; kwargs...)
@test has_julia_compat(pkg)
end
end

Expand Down
2 changes: 1 addition & 1 deletion src/pkg/Versions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ function isjoinable(up::VersionBound, lo::VersionBound)
return true
end

Base.hash(r::VersionBound, h::UInt) = hash(hash(r.t, h), r.n)
Base.hash(r::VersionBound, h::UInt) = hash(r.t, hash(r.n, h))

Check warning on line 97 in src/pkg/Versions.jl

View check run for this annotation

Codecov / codecov/patch

src/pkg/Versions.jl#L97

Added line #L97 was not covered by tests

# Hot code
function VersionBound(s::AbstractString)
Expand Down
1 change: 1 addition & 0 deletions src/stale_deps.jl
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ function _analyze_stale_deps_1(pkg::PkgId; ignore::AbstractVector{Symbol} = Symb
output = read(`$cmd --startup-file=no --color=no -e $code`, String)
@debug("Checked modules loaded in a separate process.", cmd, Text(code), Text(output))
pos = findfirst(marker, output)
@assert !isnothing(pos)
output = output[pos.stop+1:end]
loaded_uuids = map(UUID, eachline(IOBuffer(output)))

Expand Down

0 comments on commit 80f38d4

Please sign in to comment.