Skip to content
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

Improve --help to show lint options by default. #1515

Open
Jason3S opened this issue Aug 14, 2021 · 0 comments
Open

Improve --help to show lint options by default. #1515

Jason3S opened this issue Aug 14, 2021 · 0 comments

Comments

@Jason3S
Copy link
Collaborator

Jason3S commented Aug 14, 2021

Many issue raised are related to people not finding the right command line option. I.E. #1514

Currently:

npx cspell --help:

Usage: cspell [options] [command]

Spelling Checker for Code

Options:
  -V, --version               output the version number
  --no-color                  Turn off color.
  --color                     Force color
  -h, --help                  display help for command

Commands:
  lint [options] [files...]   Check spelling
  trace [options] <words...>  Trace words
  check [options] <files...>  Spell check file(s) and display the result. The full file is displayed in color.
  link                        Link dictionaries any other settings to the cspell global config.
  help [command]              display help for command

npx cspell lint --help:

Usage: cspell lint [options] [files...]

Check spelling

Options:
  -c, --config <cspell.json>  Configuration file to use.  By default cspell looks for cspell.json in the current directory.
  -v, --verbose               display more information about the files being checked and the configuration
  --locale <locale>           Set language locales. i.e. "en,fr" for English and French, or "en-GB" for British English.
  --language-id <language>    Force programming language for unknown extensions. i.e. "php" or "scala"
  --languageId <language>     Force programming language for unknown extensions. i.e. "php" or "scala"
  --wordsOnly                 Only output the words not found in the dictionaries.
  -u, --unique                Only output the first instance of a word not found in the dictionaries.
  --debug                     Output information useful for debugging cspell.json files.
  -e, --exclude <glob>        Exclude files matching the glob pattern. This option can be used multiple times to add multiple globs.
  --no-issues                 Do not show the spelling errors.
  --no-progress               Turn off progress messages
  --no-summary                Turn off summary message in console
  -s, --silent                Silent mode, suppress error messages
  -r, --root <root folder>    Root directory, defaults to current directory.
  --relative                  Issues are displayed relative to root.
  --show-context              Show the surrounding text around an issue.
  --show-suggestions          Show spelling suggestions.
  --must-find-files           Error if no files are found (default: true)
  --no-must-find-files        Do not error is no files are found
  --legacy                    Legacy output
  --local <local>             Deprecated -- Use: --locale
  -h, --help                  display help for command


Examples:
    cspell "*.js"                   Check all .js files in the current directory
    cspell "**/*.js"                Check all .js files from the current directory
    cspell "src/**/*.js"            Only check .js under src
    cspell "**/*.txt" "**/*.js"     Check both .js and .txt files.
    cspell "**/*.{txt,js,md}"       Check .txt, .js, and .md files.
    cat LICENSE | cspell stdin      Check stdin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant