misspell
misspell detects and corrects commonly misspelled english words
misspell documentation
- Version in Mega-Linter: 0.3.4
- Visit Official Web Site
Configuration in Mega-Linter
- Enable misspell by adding
SPELL_MISSPELL
in ENABLE_LINTERS variable - Disable misspell by adding
SPELL_MISSPELL
in DISABLE_LINTERS variable
- Enable auto-fixes by adding
SPELL_MISSPELL
in APPLY_FIXES variable
Variable | Description | Default value |
---|---|---|
SPELL_MISSPELL_ARGUMENTS | User custom arguments to add in linter CLI call Ex: -s --foo "bar" |
|
SPELL_MISSPELL_FILTER_REGEX_INCLUDE | Custom regex including filter Ex: (src\|lib) |
Include every file |
SPELL_MISSPELL_FILTER_REGEX_EXCLUDE | Custom regex excluding filter Ex: (test\|examples) |
Exclude no file |
SPELL_MISSPELL_CLI_LINT_MODE | Override default CLI lint mode - file : Calls the linter for each file- list_of_files : Call the linter with the list of files as argument- project : Call the linter from the root of the project |
{linter.cli_lint_mode} |
SPELL_MISSPELL_FILE_EXTENSIONS | Allowed file extensions. "*" matches any extension, "" matches empty extension. Empty list excludes all filesEx: [".py", ""] |
Exclude every file |
SPELL_MISSPELL_FILE_NAMES_REGEX | File name regex filters. Regular expression list for filtering files by their base names using regex full match. Empty list includes all files Ex: ["Dockerfile(-.+)?", "Jenkinsfile"] |
Include every file |
SPELL_MISSPELL_PRE_COMMANDS | List of bash commands to run before the linter | None |
SPELL_MISSPELL_POST_COMMANDS | List of bash commands to run after the linter | None |
SPELL_MISSPELL_DISABLE_ERRORS | Run linter but consider errors as warnings | false |
SPELL_MISSPELL_DISABLE_ERRORS_IF_LESS_THAN | Maximum number of errors allowed | 0 |
Mega-Linter Flavours
This linter is available in the following flavours
Flavor | Description | Embedded linters | Info | |
---|---|---|---|---|
all | Default Mega-Linter Flavor | 94 | ||
dart | Optimized for DART based projects | 41 | ||
documentation | Mega-Linter for documentation projects | 40 | ||
dotnet | Optimized for C, C++, C# or VB based projects | 47 | ||
go | Optimized for GO based projects | 42 | ||
java | Optimized for JAVA based projects | 42 | ||
javascript | Optimized for JAVASCRIPT or TYPESCRIPT based projects | 49 | ||
php | Optimized for PHP based projects | 44 | ||
python | Optimized for PYTHON based projects | 49 | ||
ruby | Optimized for RUBY based projects | 41 | ||
rust | Optimized for RUST based projects | 41 | ||
salesforce | Optimized for Salesforce based projects | 43 | ||
scala | Optimized for SCALA based projects | 41 | ||
swift | Optimized for SWIFT based projects | 41 | ||
terraform | Optimized for TERRAFORM based projects | 45 |
Behind the scenes
How are identified applicable files
- If this linter is active, all files linted by all other active linters will be linted
How the linting is performed
- misspell is called once with the list of files as arguments
Example calls
misspell myfile.any
Help content
Usage of misspell:
-debug
Debug matching, very slow
-error
Exit with 2 if misspelling found
-f string
'csv', 'sqlite3' or custom Golang template for output
-i string
ignore the following corrections, comma separated
-j int
Number of workers, 0 = number of CPUs
-legal
Show legal information and exit
-locale string
Correct spellings using locale perferances for US or UK. Default is to use a neutral variety of English. Setting locale to US will correct the British spelling of 'colour' to 'color'
-o string
output file or [stderr|stdout|] (default "stdout")
-q Do not emit misspelling output
-source string
Source mode: auto=guess, go=golang source, text=plain or markdown-like text (default "auto")
-v Show version and exit
-w Overwrite file with corrections (default is just to display)
Installation on mega-linter Docker image
- Dockerfile commands :
RUN curl -L -o ./install-misspell.sh https://git.io/misspell \
&& sh ./install-misspell.sh
Example success log
Results of misspell linter (version dev)
See documentation on https://nvuillam.github.io/mega-linter/descriptors/spell_misspell/
-----------------------------------------------
✅ [SUCCESS] .automation/test/spell
Example error log
Results of misspell linter (version dev)
See documentation on https://nvuillam.github.io/mega-linter/descriptors/spell_misspell/
-----------------------------------------------
❌ [ERROR] .automation/test/spell
.automation/test/spell/spell_bad_1.js:1:6: "langauge" is a misspelling of "language"