-
-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add quiet flag #4748
feat: add quiet flag #4748
Conversation
Remember to edit the PR text to say |
Updated 👍🏾 |
Thank you for adding this. The actual change is much simpler. Only one file needs to be changed and a snapshot updated. The rest of the files will get automatically updated. diff --git a/packages/cspell/src/app/commandLint.ts b/packages/cspell/src/app/commandLint.ts
index d9c353c27..982990563 100644
--- a/packages/cspell/src/app/commandLint.ts
+++ b/packages/cspell/src/app/commandLint.ts
@@ -96,6 +96,7 @@ export function commandLint(prog: Command): Command {
.option('--no-progress', 'Turn off progress messages')
.option('--no-summary', 'Turn off summary message in console.')
.option('-s, --silent', 'Silent mode, suppress error messages.')
+ .addOption(new CommanderOption('--quiet', 'An alias of --silent').implies({ silent: true }))
.option('--fail-fast', 'Exit after first file with an issue or error.')
.addOption(new CommanderOption('--no-fail-fast', 'Process all files even if there is an error.').hideHelp())
.option('-r, --root <root folder>', 'Root directory, defaults to current directory.') diff --git a/packages/cspell/src/app/__snapshots__/app.test.ts.snap b/packages/cspell/src/app/__snapshots__/app.test.ts.snap
index 873719d57..85e1e3e1c 100644
--- a/packages/cspell/src/app/__snapshots__/app.test.ts.snap
+++ b/packages/cspell/src/app/__snapshots__/app.test.ts.snap
@@ -513,6 +513,7 @@ exports[`Validate cli > app 'no-args' Expect Error: 'outputHelp' 1`] = `
" --no-progress Turn off progress messages",
" --no-summary Turn off summary message in console.",
" -s, --silent Silent mode, suppress error messages.",
+ " --quiet An alias of --silent",
" --fail-fast Exit after first file with an issue or error.",
" -r, --root <root folder> Root directory, defaults to current directory.",
" --relative Issues are displayed relative to root.", |
@Jason3S tried to run the project locally to update the snapshots, but it didn't work. Could you fix that? 👍🏾 |
I see you figured it out. |
@Jason3S yep! Thx 😄 |
@Jason3S this would be version 7.0.2? |
It will be part of 7.1.0 |
There was an issue with the publishing script, it issued the wrong version. Your change is in 7.0.2 and in 7.1.1. There is no 7.1.0. |
@Jason3S np, also an OSS maintainer so know how easy it is to get that wrong. Thanks for publishing, and thank you for cspell! I donated a bit and hope it gives you motivation to continue working in Open Source ❤️ |
Thank you for the donation. |
After trying it out, I'm not sure if I think As it is, if the spell check finds spelling issues, it will just return a non-zero result without a message. |
@Jason3S Quiet should only emit errors, nothing else that bloats logs. Atm using --quiet to get the CI pass with |
Closes #4742
Tests needs to be added, I'm not that familar with the repo, could you just pick up the rest? Thx! ❤️