feat(runner): support ** glob patterns in file_exclude #88

Closed
opened 2026-05-27 06:17:09 +02:00 by michael · 2 comments
Owner

Problem

file_exclude in rule YAML only supports flat path prefixes and exact matches.
Patterns like "lib/" or "adapters//*.lua" are not supported.

This blocks rules that need to exclude entire directory trees, e.g.:

  • no-direct-sys-new: exclude lib/, adapters/ui/ but flag core/ and commands/
  • Any rule where excluded paths have subdirectories

Current behavior

file_exclude: "test/*.lua,lib/**"

The "lib/**" part does not match "lib/daw/common/sys.lua" -- only
exact prefix "lib/" would work, but that also excludes legitimate violations
in lib/ subdirectories of other types.

Acceptance criteria

  • file_exclude supports ** glob for recursive directory matching
  • file_exclude supports * glob for single-level wildcard
  • existing flat excludes continue to work unchanged

Notes

Affects runner.lua is_excluded() and collect_files().
Related: no-direct-sys-new rule (DAW/fragjan#13 area), adapter bypass detection.

## Problem file_exclude in rule YAML only supports flat path prefixes and exact matches. Patterns like "lib/**" or "adapters/**/*.lua" are not supported. This blocks rules that need to exclude entire directory trees, e.g.: - no-direct-sys-new: exclude lib/, adapters/ui/ but flag core/ and commands/ - Any rule where excluded paths have subdirectories ## Current behavior file_exclude: "test/*.lua,lib/**" The "lib/**" part does not match "lib/daw/common/sys.lua" -- only exact prefix "lib/" would work, but that also excludes legitimate violations in lib/ subdirectories of other types. ## Acceptance criteria - [ ] file_exclude supports ** glob for recursive directory matching - [ ] file_exclude supports * glob for single-level wildcard - [ ] existing flat excludes continue to work unchanged ## Notes Affects runner.lua is_excluded() and collect_files(). Related: no-direct-sys-new rule (DAW/fragjan#13 area), adapter bypass detection.
michael added this to the Basic Version milestone 2026-05-30 16:08:42 +02:00
Author
Owner

Blocked by DAW/fragjan#102 (feat(runner): flexible scan targets --
file_include, glob patterns, single file, auto-root detection).

Blocked by DAW/fragjan#102 (feat(runner): flexible scan targets -- file_include, glob patterns, single file, auto-root detection).
Author
Owner

Completed in v0.2.10

Implemented as part of DAW/fragjan#102.
glob_match() in core/runner/init.lua supports ** patterns.
Verified working in no-direct-sys-new rule (lib/, adapters/).

## Completed in v0.2.10 Implemented as part of DAW/fragjan#102. glob_match() in core/runner/init.lua supports ** patterns. Verified working in no-direct-sys-new rule (lib/**, adapters/**).
michael 2026-05-31 15:23:55 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
DAW/fragjan#88
No description provided.