Skip to content

Commit

Permalink
warnonly
Browse files Browse the repository at this point in the history
  • Loading branch information
mortenpi committed Aug 9, 2024
1 parent 6eb95f4 commit 5465b9c
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/utils/rewrite.jl
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ function fix_makefile(makefile, documenter_version = v"0.24")
has_root = false
has_remotes = false
has_repo = false
has_warnonly = false
html = documenter_version < v"0.21" ? QuoteNode(:html) : :(Documenter.HTML())

fixkwarg = argument -> begin
Expand Down Expand Up @@ -96,6 +97,10 @@ function fix_makefile(makefile, documenter_version = v"0.24")
has_doctest = true
argument.args[2] = false
end
if name == :warnonly
has_warnonly = true
argument.args[2] = true
end
end
end

Expand Down Expand Up @@ -136,6 +141,9 @@ function fix_makefile(makefile, documenter_version = v"0.24")
if !has_repo
push!(new_args, Expr(:kw, :repo, ""))
end
if !has_warnonly
push!(new_args, Expr(:kw, :warnonly, true))
end

return Expr(:call, new_args...)
end
Expand Down Expand Up @@ -167,7 +175,7 @@ end
function rewrite_makedocs_call(f!, ast)
if ast isa Expr
if Meta.isexpr(ast, :call) && (ast.args[1] == :makedocs || ast.args[1] == :(Documenter.makedocs))
return true, f!(elem)
return true, f!(ast)
else
should_break = false
for i in eachindex(ast.args)
Expand Down
12 changes: 12 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,18 @@ end
)
end
end,
(
name="JuliaHub",
url="https://github.com/JuliaComputing/JuliaHub.jl.git",
uuid="bc7fa6ce-b75e-4d60-89ad-56c957190b6e",
versions=[v"0.1.11"],
server_type="github",
api_url="",
installs = [true],
success = [true],
doctype = ["documenter"],
using_failed = [false],
)
]

basepath = @__DIR__
Expand Down

0 comments on commit 5465b9c

Please sign in to comment.