lake: command-specific options should not be accepted globally
Nobody has claimed this yet.
- Dominant language
- Lean
- Stars
- 9.2k
- Forks
- 990
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 175
Description
lake shake has several options (--keep-implied, --keep-prefix, --force, --fix, --trace, etc.) that are parsed in the global lakeLongOption function but only meaningful for lake shake. This means e.g. lake build --fix is silently accepted and ignored.
The upcoming lake profile command (#12545) adds more of these: --rate, --output, --raw. The --output case is particularly unfortunate since it's a plausible flag for other commands.
It would be better to scope command-specific options so they're only accepted for the relevant command, and produce an error otherwise.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the global lakeLongOption function and trace how options are parsed for lake shake and the upcoming lake profile command. Verify that command-specific flags are rejected by unrelated commands, including plausible flags such as --output, and that the relevant commands still accept their own options.
Written by the indexing model from the issue text.
Assessment
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100