misspell
misspell detects and corrects commonly misspelled english words
misspell documentation
- Version in MegaLinter: 0.3.4
- Visit Official Web Site
Configuration in MegaLinter
- 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 |
list_of_files |
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 |
MegaLinter Flavours
This linter is available in the following flavours
Flavor | Description | Embedded linters | Info | |
---|---|---|---|---|
all | Default MegaLinter Flavor | 114 | ||
cupcake | MegaLinter for the most commonly used languages | 82 | ||
documentation | MegaLinter for documentation projects | 48 | ||
dotnet | Optimized for C, C++, C# or VB based projects | 60 | ||
go | Optimized for GO based projects | 50 | ||
java | Optimized for JAVA based projects | 51 | ||
javascript | Optimized for JAVASCRIPT or TYPESCRIPT based projects | 57 | ||
php | Optimized for PHP based projects | 51 | ||
python | Optimized for PYTHON based projects | 59 | ||
ruby | Optimized for RUBY based projects | 48 | ||
rust | Optimized for RUST based projects | 48 | ||
salesforce | Optimized for Salesforce based projects | 51 | ||
swift | Optimized for SWIFT based projects | 48 | ||
terraform | Optimized for TERRAFORM based projects | 53 |
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 (
list_of_files
CLI lint mode)
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 ML_THIRD_PARTY_DIR="/third-party/misspell" \
&& mkdir -p ${ML_THIRD_PARTY_DIR} \
&& curl --retry 10 --retry-all-errors -L -o ${ML_THIRD_PARTY_DIR}/install-misspell.sh https://git.io/misspell \
&& sh .${ML_THIRD_PARTY_DIR}/install-misspell.sh \
&& find ${ML_THIRD_PARTY_DIR} -type f -not -name 'LICENSE*' -delete -o -type d -empty -delete \
&& find /tmp -path '/tmp/tmp.*' -type f -name 'misspell*' -delete -o -type d -empty -delete