Skip to content

misspell

misspell detects and corrects commonly misspelled english words

misspell documentation

misspell - GitHub

Configuration in Mega-Linter

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_FILE_EXTENSIONS Allowed file extensions. "*" matches any extension, "" matches empty extension. Empty list excludes all files
Ex: [".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_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 84 Docker Image Size (tag) Docker Pulls
dart Optimized for DART based projects 38 Docker Image Size (tag) Docker Pulls
documentation Mega-Linter for documentation projects 37 Docker Image Size (tag) Docker Pulls
dotnet Optimized for C, C++, C# or VB based projects 43 Docker Image Size (tag) Docker Pulls
go Optimized for GO based projects 39 Docker Image Size (tag) Docker Pulls
java Optimized for JAVA based projects 38 Docker Image Size (tag) Docker Pulls
javascript Optimized for JAVASCRIPT or TYPESCRIPT based projects 46 Docker Image Size (tag) Docker Pulls
php Optimized for PHP based projects 41 Docker Image Size (tag) Docker Pulls
python Optimized for PYTHON based projects 44 Docker Image Size (tag) Docker Pulls
ruby Optimized for RUBY based projects 38 Docker Image Size (tag) Docker Pulls
rust Optimized for RUST based projects 38 Docker Image Size (tag) Docker Pulls
salesforce Optimized for Salesforce based projects 38 Docker Image Size (tag) Docker Pulls
scala Optimized for SCALA based projects 38 Docker Image Size (tag) Docker Pulls
swift Optimized for SWIFT based projects 38 Docker Image Size (tag) Docker Pulls
terraform Optimized for TERRAFORM based projects 40 Docker Image Size (tag) Docker Pulls

Behind the scenes

How are identified applicable files

  • If this linter is active, all files linted by all other active linters will be linted

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"