You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug: gradle TOML filter match_command regex never matches bare gradle or gradlew #2708
The match_command regex in src/filters/gradle.toml is structurally broken and never activates for bare gradle or gradlew invocations — only ./gradle and ./gradlew work.
Current regex
^(gradle|gradlew|\\./)gradlew?\\b
The alternation group (gradle|gradlew|\\./)captures the entire command name, then expects anothergradlew? suffix immediately after. This creates impossible matches:
Input
Group captures
Then needs
Full match attempt
Result
gradle build
gradle
gradlew?
gradlegradle or gradlegradlew
NO MATCH
gradlew build
gradlew
gradlew?
gradlewgradle or gradlewgradlew
NO MATCH
./gradle build
./
gradlew?
./gradle
MATCH
./gradlew build
./
gradlew?
./gradlew
MATCH
Only the ./ prefix case works because it's the only branch where the suffix gradlew? makes sense.
Expected behavior
All four forms should match: gradle, gradlew, ./gradle, ./gradlew.
Impact
The gradle filter never activates for direct gradle or gradlew invocations, meaning users get unfiltered output with zero token savings for all Gradle commands unless they use the ./ prefix form.
Fix
Change the regex to make ./ optional and capture the command name in one group:
Regex in src/filters/gradle.toml is structurally broken — only ./gradle/./gradlew match; bare gradle/gradlew invocations are never filtered. Fix: change regex to ^(\./)?(gradlew?)\b.
This looks like a simple fix that could be auto-resolved. Repo maintainers can use /wshm fix to attempt it.
📁 Relevant files
src/filters/gradle.toml
Triaged automatically by wshm · This is an automated analysis, not a human review.
I’m unclaiming this one. I found that either another PR is already in flight for it or the requested changes already appear to be present upstream, so I don’t want to create duplicate noise.
Fixed the other way. The gradle.toml filter was removed by #2709 because it was never reachable: the hook rewrites gradle build, gradlew build and ./gradlew build to rtk gradlew, which is the real filter, so the premise that these ran unfiltered does not hold, and widening the regex would only have created a second, shadowed path. That change is on develop and ships with the next release. ./gradle build is not rewritten, but that form was never filtered before either; open a new issue if you need it.
Activity
pszymkowiak commentedon Jun 29, 2026
🔍 Automated Triage
bughighSummary
Regex in src/filters/gradle.toml is structurally broken — only
./gradle/./gradlewmatch; baregradle/gradlewinvocations are never filtered. Fix: change regex to^(\./)?(gradlew?)\b.📁 Relevant files
src/filters/gradle.tomlTriaged automatically by wshm · This is an automated analysis, not a human review.
nightcityblade commentedon Jun 29, 2026
Hi, I'd like to work on this. I'll submit a PR shortly.
nightcityblade commentedon Jun 29, 2026
I’m unclaiming this one. I found that either another PR is already in flight for it or the requested changes already appear to be present upstream, so I don’t want to create duplicate noise.
fix(gradle): remove the unreachable gradle.toml filter
KuSh commentedon Sep 27, 2026
Fixed the other way. The
gradle.tomlfilter was removed by #2709 because it was never reachable: the hook rewritesgradle build,gradlew buildand./gradlew buildtortk gradlew, which is the real filter, so the premise that these ran unfiltered does not hold, and widening the regex would only have created a second, shadowed path. That change is on develop and ships with the next release../gradle buildis not rewritten, but that form was never filtered before either; open a new issue if you need it.