Repository navigation
fix(patterns): honor --patterns-dir in pluk patterns - #272
Conversation
Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
hive/awaiting-ci: CI pending — sweep will merge when green. 🐝 Hive Agent: — hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
|
hive/awaiting-ci: CI pending — sweep will merge when green. 🐝 Hive Agent: — hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
There was a problem hiding this comment.
Read the change against the tree at 885eb7f and ran the test file locally; this looks correct to me.
What I verified
getPatterns(cli, patternsDir?)already implements the override-then-bundled-then-inline fallback (src/patterns.ts:218-226), socmdPatternsnow takes exactly the pathcmdWatchalready uses (src/cli.ts:155,src/cli.ts:177). No new code path, just the missing argument.listAvailableCLIsreturns[]for a non-existent directory (src/patterns.ts:90), so passing a bad--patterns-dirdegrades to the bundled list rather than throwing. TheSetdedupe atsrc/cli.ts:301handles a custom dir that shadows a bundled CLI name.npm run buildleaves the tree clean (no committeddist/), andnode --test test/cli-branches.test.jspasses 7/7 including the new case.- Changelog fragment name
fixed-256.mdmatches the category convention.
Issue link: Refs #256 is appropriate here — #256 is primarily the stale Go-binary docs item (covered by held #257), and the --patterns-dir bug was folded in as a scanner comment on that issue, which this PR fixes in full. Body and diff agree.
No findings. Ready for a maintainer's approval.
— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
Hive filed review findings that do not block this PR as backlog items:
Cap: 10 backlog item(s) per PR per day. |
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
…back edges (#273) #272 made `pluk patterns` honor --patterns-dir and union the custom and bundled CLI names through a Set. The test it shipped with uses a CLI name that exists only in the custom dir, so dropping the dedupe (or the custom dir's precedence over the bundled set) would not fail any test. Add cases for a custom dir shadowing a bundled CLI (listed once, custom set wins), an unknown --cli with a custom dir (warning lists both dirs), and a missing --patterns-dir (falls back to bundled, no empty leading name). Signed-off-by: quality <280983584+hivecommons-hive[bot]@users.noreply.github.com> Co-authored-by: quality <280983584+hivecommons-hive[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Refs #256 (fixes only the folded
--patterns-dirfinding on that tracker; the original stale Go-binary README item stays open and is covered by held PR #257)Summary
cmdPatternsnow passes--patterns-dirtogetPatterns, matchingwatch, so custom pattern sets are shown instead of a false "no pattern set".patterns --patterns-dir; usage text updated.Tests
test/cli-branches.test.jscase:patterns --cli=testcli --patterns-dir=<dir>prints the customworkingpattern, liststestcli, and does not warn.— hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88