Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed

- The minimum supported julia version is increased to 1.6. ([#328])
- Test for undocumented names is now activated by default ([#368])

## Version [v0.8.14] - 2025-08-04

Expand Down
4 changes: 2 additions & 2 deletions src/Aqua.jl
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ passed to `\$x` to specify the keyword arguments for `test_\$x`.
- `deps_compat = true`
- `piracies = true`
- `persistent_tasks = true`
- `undocumented_names = false`
- `undocumented_names = true`
"""
function test_all(
testtarget::Module;
Expand All @@ -58,7 +58,7 @@ function test_all(
deps_compat = true,
piracies = true,
persistent_tasks = true,
undocumented_names = false,
undocumented_names = true,
)
if ambiguities !== false
@testset "Method ambiguity" begin
Expand Down
6 changes: 3 additions & 3 deletions src/exports.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ function isbindingresolved(m::Module, s::Symbol)
end
end

function walkmodules(f, x::Module)
function walkmodules(f, x::Module; all::Bool = true)
f(x)
for n in names(x; all = true)
for n in names(x; all)
# `isdefined` and `getproperty` can trigger deprecation warnings
if isbindingresolved(x, n) && !Base.isdeprecated(x, n)
isdefined(x, n) || continue
y = getproperty(x, n)
if y isa Module && y !== x && parentmodule(y) === x
walkmodules(f, y)
walkmodules(f, y; all)
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion src/undocumented_names.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function test_undocumented_names(m::Module; broken::Bool = false)
@static if VERSION >= v"1.11"
# exclude the module name itself because it has the README as auto-generated docstring (https://github.com/JuliaLang/julia/pull/39093)
undocumented_names = Symbol[]
walkmodules(m) do x
walkmodules(m; all=false) do x # we don't care about undocumented names in private submodules
append!(undocumented_names, Docs.undocumented_names(x))
end
undocumented_names = filter(n -> n != nameof(m), undocumented_names)
Expand Down
2 changes: 2 additions & 0 deletions test/pkgs/PkgWithUndocumentedNamesInSubmodule.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,6 @@ struct UndocumentedStruct end

end

export SubModule

end # module
Loading