From a10661d116cea3271f1f23de8964f9d7a8fe26c3 Mon Sep 17 00:00:00 2001 From: Nick Robinson Date: Thu, 15 Jan 2026 23:25:52 +0000 Subject: [PATCH 1/3] Replace `Base.walkdir` with variation that skips hidden directories --- src/ReTestItems.jl | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/src/ReTestItems.jl b/src/ReTestItems.jl index ee0c121..27f69a4 100644 --- a/src/ReTestItems.jl +++ b/src/ReTestItems.jl @@ -790,6 +790,19 @@ function nestedrelpath(path::T, startdir::AbstractString) where {T <: AbstractSt end end +# Like `Base.walkdir` but does not descend into hidden directories (those starting with '.') +function _walkdir(root) + return Channel{Tuple{String, Vector{String}, Vector{String}}}() do ch + for (dir, dirs, files) in Base.walkdir(root) + # Filter out hidden directories to prevent descending into them. + # Modifying `dirs` in-place works because walkdir uses it to determine + # which subdirectories to visit next (when topdown=true, the default). + filter!(d -> !startswith(d, '.'), dirs) + put!(ch, (dir, dirs, files)) + end + end +end + # is `dir` the root of a subproject inside the current project? function _is_subproject(dir, current_projectfile) projectfile = _project_file(dir) @@ -825,8 +838,8 @@ function include_testfiles!(project_name, projectfile, paths, ti_filter::TestIte end return setups end - hidden_re = r"\.\w" - @sync for (root, d, files) in Base.walkdir(project_root) + # Use _walkdir to skip hidden directories + @sync for (root, d, files) in _walkdir(project_root) if subproject_root !== nothing && startswith(root, subproject_root) @debugv 1 "Skipping files in `$root` in subproject `$subproject_root`" continue @@ -835,12 +848,11 @@ function include_testfiles!(project_name, projectfile, paths, ti_filter::TestIte continue end rpath = nestedrelpath(root, project_root) - startswith(rpath, hidden_re) && continue # skip hidden directories dir_node = DirNode(rpath; report, verbose=verbose_results) dir_nodes[rpath] = dir_node push!(get(dir_nodes, dirname(rpath), root_node), dir_node) for file in files - startswith(file, hidden_re) && continue # skip hidden files + startswith(file, '.') && continue # skip hidden files filepath = joinpath(root, file) # We filter here, rather than the testitem level, to make sure we don't # `include` a file that isn't supposed to be a test-file at all, e.g. its From f15e194314e988ef8643ddca27cd94260d97364a Mon Sep 17 00:00:00 2001 From: Nick Robinson Date: Fri, 16 Jan 2026 12:26:38 +0000 Subject: [PATCH 2/3] Update src/ReTestItems.jl Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- src/ReTestItems.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ReTestItems.jl b/src/ReTestItems.jl index 27f69a4..1994295 100644 --- a/src/ReTestItems.jl +++ b/src/ReTestItems.jl @@ -793,7 +793,7 @@ end # Like `Base.walkdir` but does not descend into hidden directories (those starting with '.') function _walkdir(root) return Channel{Tuple{String, Vector{String}, Vector{String}}}() do ch - for (dir, dirs, files) in Base.walkdir(root) + for (dir, dirs, files) in Base.walkdir(root; topdown=true) # Filter out hidden directories to prevent descending into them. # Modifying `dirs` in-place works because walkdir uses it to determine # which subdirectories to visit next (when topdown=true, the default). From 2251a82933cf8b8fc237a5270bbbbc403b6cc84b Mon Sep 17 00:00:00 2001 From: Nick Robinson Date: Fri, 16 Jan 2026 13:11:17 +0000 Subject: [PATCH 3/3] Bump version --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 0f8517b..fa44066 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "ReTestItems" uuid = "817f1d60-ba6b-4fd5-9520-3cf149f6a823" -version = "1.35.0" +version = "1.35.1" [deps] Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"