From 9e39dc94c7f45d09035b4855ca09562940846d7e Mon Sep 17 00:00:00 2001 From: Guillaume Dalle <22795598+gdalle@users.noreply.github.com> Date: Sun, 24 Nov 2024 12:52:42 +0100 Subject: [PATCH] Fixes --- docs/src/index.md | 4 ---- src/undocumented_names.jl | 11 +++++------ test/test_undocumented_names.jl | 2 ++ 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/docs/src/index.md b/docs/src/index.md index 94081fe0..22509efc 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 2fe848fd..16584184 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 e53e2d9b..83f2f1f5 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