diff --git a/docs/src/index.md b/docs/src/index.md index 94081fe..22509ef 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -11,10 +11,6 @@ Aqua.jl provides functions to run a few automatable checks for Julia packages: * There are no "obvious" type piracies. * The package does not create any persistent Tasks that might block precompilation of dependencies. -```@docs -Aqua -``` - ## Quick usage Call `Aqua.test_all(YourPackage)` from the REPL, e.g., diff --git a/src/undocumented_names.jl b/src/undocumented_names.jl index 2fe848f..1658418 100644 --- a/src/undocumented_names.jl +++ b/src/undocumented_names.jl @@ -8,20 +8,19 @@ Test that all public names in `module` have a docstring (including the module it """ function test_undocumented_names(m::Module) @static if VERSION >= v"1.11" - names = Docs.undocumented_names(m) - names_filtered = filter(n -> n != nameof(m), names) - @test isempty(names_filtered) + undocumented_names = filter(n -> n != nameof(m), Docs.undocumented_names(m)) + @test isempty(undocumented_names) else - names_filtered = Symbol[] + undocumented_names = Symbol[] end - if !isempty(names_filtered) + if !isempty(undocumented_names) printstyled( stderr, "Undocumented names detected:\n"; bold = true, color = Base.error_color(), ) - show(stderr, MIME"text/plain"(), names_filtered) + show(stderr, MIME"text/plain"(), undocumented_names) println(stderr) end end diff --git a/test/test_undocumented_names.jl b/test/test_undocumented_names.jl index e53e2d9..83f2f1f 100644 --- a/test/test_undocumented_names.jl +++ b/test/test_undocumented_names.jl @@ -16,9 +16,11 @@ else @test length(results) == 0 end # Fail +println("### Expected output START ###") results = @testtestset begin Aqua.test_undocumented_names(PkgWithUndocumentedNames) end +println("### Expected output END ###") if VERSION >= v"1.11" @test length(results) == 1 @test results[1] isa Test.Fail