Skip to content

fix: report file paths passed to threads option - #215

Merged
luojiyin1987 merged 2 commits into
masterfrom
fix/threads-file-path-parsing
Nov 5, 2026
Merged

luojiyin1987 merged 2 commits into
masterfrom
fix/threads-file-path-parsing

Conversation

@luojiyin1987

@luojiyin1987 luojiyin1987 commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

What changed

  • Require a value for -t and --threads.
  • Report a misplaced file path before the CLI shows no-input help.
  • Report nonnumeric values, including paths without extensions.
  • Keep the default auto mode when the option is absent.
  • Cover the requested commands in CLI tests.
  • Update the English and Chinese usage docs.

Why

Commander consumes the token after -t as an option value.
The command lint-md -t a.md previously lost its only file argument.
The CLI now reports that path and exits with an error.

Verification

  • npm test -- --runInBand: 28 suites and 270 tests passed.
  • npm run lint: passed.
  • npm run test:package: passed.
  • node lib/src/lint-md.js -t a.md: exits 1 and names a.md.
  • node lib/src/lint-md.js -t a.md b.md: exits 1 and names a.md.
  • node lib/src/lint-md.js -t README: exits 1 and names README.
  • node lib/src/lint-md.js -t 0 a.md: exits 1 and reports an invalid thread count.

No logs or user data are included.

Closes #214

Require a thread value and report paths before showing no-input help.

Cover the requested CLI forms and update usage docs.
Cover two file paths after -t and extensionless file names.

Keep the existing invalid thread message and add file path guidance.
@luojiyin1987
luojiyin1987 merged commit 260134b into master Nov 5, 2026
6 checks passed
@luojiyin1987
luojiyin1987 deleted the fix/threads-file-path-parsing branch November 5, 2026 03:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: report file paths passed to -t

1 participant