btford / btford/write-good

ReturnCode always 0 when run against multiple globs

Open
#117 2 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
5.1k
Forks
187
PR merge metrics
No merged PRs in 30d

Description

If you use multiple glob patterns, write-good will always return 0 even if there's grammar mistakes.

This is what happens when using multiple globs, `*.md` and `./docs/*.md`:
Example
```bash
$ write-good *.md ./docs/*.md --parse --no-passive --no-adverb --no-tooWordy --no-cliches
README.md:14:29:"various" is a weasel word
README.md:15:6:"and" is repeated

$ echo $?
0
```

Whereas this is what happens when run with only one glob, `*.md`:
```bash
$ write-good *.md --parse --no-passive --no-adverb --no-tooWordy --no-cliches
README.md:14:29:"various" is a weasel word
README.md:15:6:"and" is repeated
$ echo $?
255
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the reported command with multiple glob patterns and compare its exit status with the single-glob command. Trace the CLI's glob-processing and return-code handling; done means grammar findings from any matched file produce a nonzero exit status, with coverage for multiple globs.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.