Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

adopt: a filter pattern that matches nothing is reported only as a zero count, never as a dead pattern

Closed
#312 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

A pull request for this has already been merged.

  • #418 by @Kuldeep2822k — merged

Assessment

Difficulty
3/5
Estimated time
Half a day
Newbie friendliness
62/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
nodejs, typescript
Domain
cli

Research direction

Start by running the repro from the issue: palee-test adopt --all --dry-run --exclude 'a/*.md', and find where the Excluded (Pattern) count is computed for the adopt scan. The payload names no source files, so locate the glob-matching code yourself. Done means a supplied pattern that matches zero files across the scan prints a warning naming the pattern, while patterns that do match stay silent. The adopt --help pattern-syntax section and the repeated-flag behaviour are separate asks and can be left out of this change.

Written by the indexing model from the issue text.

Description

bug core priority: low

Summary

When an --exclude/--include pattern matches nothing, the batch prints Excluded (Pattern): 0 notes and proceeds. A learner cannot distinguish "the filter worked and there was nothing to filter" from "this pattern will never match any file".

Repro

palee-test adopt --all --dry-run --exclude 'a/*.md'
  Total Scanned:    2 files
  Ready to Adopt:   1 notes
  Excluded (Pattern): 0 notes

The pattern is root-anchored because it contains /, so it addressed a path that does not exist while the intended files stayed in scope. No warning of any kind.

Expected

When a supplied pattern matches zero files across the whole scan, say so — e.g. --exclude 'a/*.md' matched no file in this scope; check the pattern.

Related dialect problems

The glob dialect is undocumented. It behaves differently depending on whether the pattern contains / (root-anchored) or not (segment-matching), and matching is case-insensitive. A short pattern-syntax section in adopt --help would prevent most of this class, and a repeated flag currently lets the last value silently win.

Environment
  • palee 0.6.0, local build from main at 02dacd0 (installed as palee-test; reproduce with palee)
  • Node v24.19.0, Windows 11 x64, Git Bash
  • Every command was run for real; exit codes captured by command substitution (never $? after a pipe)
Dominant language
TypeScript
Stars
1
Forks
0
Avg merge
21h 20m
Merged PRs (30d)
176

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Kuldeep2822k/cli

All issues in Kuldeep2822k/cli

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.