Skip to content

Commit

Permalink
Destroy some formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
lgoettgens committed Oct 24, 2023
1 parent 3688186 commit c7def8e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
6 changes: 3 additions & 3 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
using Documenter, Aqua

makedocs(;
modules = [Aqua],
modules = [Aqua ],
pages = ["Home" => "index.md"],
sitename = "Aqua.jl",
format = Documenter.HTML(; repolink = "https://github.com/JuliaTesting/Aqua.jl"),
authors = "Takafumi Arakaki",
warnonly = true,
warnonly = true
)

deploydocs(; repo = "github.com/JuliaTesting/Aqua.jl", push_preview = true)
deploydocs(repo = "github.com/JuliaTesting/Aqua.jl", push_preview = true)
16 changes: 8 additions & 8 deletions src/ambiguities.jl
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ ispackage(m::Module) =
if m in (Base, Core)
true
else
parentmodule(m) == m
parentmodule(m)==m
end

strnameof(x) = string(x)
Expand All @@ -71,7 +71,8 @@ function getobj((pkgid, name)::ExcludeSpec)
end

function normalize_and_check_exclude(exclude::AbstractVector)
exspecs = mapfoldl(normalize_exclude, push!, exclude, init = ExcludeSpec[])
exspecs = mapfoldl(normalize_exclude, push!, exclude, init =
ExcludeSpec[])
for (spec, obj) in zip(exspecs, exclude)
if getobj(spec) !== obj
error("Name `$(spec[2])` is resolved to a different object.")
Expand All @@ -81,17 +82,16 @@ function normalize_and_check_exclude(exclude::AbstractVector)
end

function reprexclude(exspecs::Vector{ExcludeSpec})
itemreprs = map(exspecs) do (pkgid, name)
string("(", reprpkgid(pkgid), " => ", repr(name), ")")
end
return string("Aqua.ExcludeSpec[", join(itemreprs, ", "), "]")
itemreprs = map(exspecs) do (pkgid, name)
string("(", reprpkgid(pkgid), " => ", repr(name), ")")
end
return string("Aqua.ExcludeSpec[", join(itemreprs, ", "), "]")
end

function _test_ambiguities(packages::Vector{PkgId}; broken::Bool = false, kwargs...)
num_ambiguities, strout, strerr = _find_ambiguities(packages; kwargs...)

print(stderr, strerr)
print(stdout, strout)
print(stderr,strerr); print(stdout, strout)

if broken
@test_broken num_ambiguities == 0
Expand Down
8 changes: 4 additions & 4 deletions test/test_ambiguities.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ include("preamble.jl")
using PkgWithAmbiguities

@testset begin
function check_testcase(exclude, num_ambiguities::Int; broken::Bool = false)
pkgids = Aqua.aspkgids([PkgWithAmbiguities, Core]) # include Core to find constructor ambiguities
function check_testcase(exclude, num_ambiguities::Int; broken::Bool = false)
pkgids = Aqua.aspkgids([PkgWithAmbiguities, Core]) # include Core to find constructor ambiguities
num_ambiguities_, strout, strerr = Aqua._find_ambiguities(pkgids; exclude = exclude)
if broken
@test_broken num_ambiguities_ == num_ambiguities
else
@test num_ambiguities_ == num_ambiguities
end
@test isempty(strerr)
@test isempty( strerr )
end

@static if VERSION >= v"1.3-"
Expand All @@ -22,7 +22,7 @@ using PkgWithAmbiguities
total = 8
end

check_testcase([], total)
check_testcase([ ], total)

# exclude just anything irrelevant, see #49
check_testcase([convert], total)
Expand Down

0 comments on commit c7def8e

Please sign in to comment.