Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
gdalle committed Nov 24, 2024
1 parent 05bf3ec commit 9e39dc9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
4 changes: 0 additions & 4 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.,
Expand Down
11 changes: 5 additions & 6 deletions src/undocumented_names.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 2 additions & 0 deletions test/test_undocumented_names.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9e39dc9

Please sign in to comment.