Add a bit more detail to the extra kwargs warning
This commit is contained in:
parent
b3449ee272
commit
ab55313ee9
@ -86,7 +86,9 @@ function Template(::Val{false}; kwargs...)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
isempty(kwargs) || @warn "Unrecognized keywords were supplied" kwargs
|
if !isempty(kwargs)
|
||||||
|
@warn "Unrecognized keywords were supplied, see the documentation for help" kwargs
|
||||||
|
end
|
||||||
|
|
||||||
t = Template(authors, dir, host, julia, plugins, user)
|
t = Template(authors, dir, host, julia, plugins, user)
|
||||||
foreach(p -> validate(p, t), t.plugins)
|
foreach(p -> validate(p, t), t.plugins)
|
||||||
|
@ -46,7 +46,7 @@
|
|||||||
|
|
||||||
@testset "Unsupported keywords warning" begin
|
@testset "Unsupported keywords warning" begin
|
||||||
@test_logs tpl()
|
@test_logs tpl()
|
||||||
@test_logs (:warn, "Unrecognized keywords were supplied") tpl(; x=1, y=2)
|
@test_logs (:warn, r"Unrecognized keywords were supplied") tpl(; x=1, y=2)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user