Skip to content

Home

GitHub release Docker Pulls Downloads/week GitHub stars Mega-Linter codecov Secured with Trivy GitHub contributors GitHub Sponsors PRs Welcome Tweet

Mega-Linter is an 100% Open-Source tool for CI/CD workflows that analyzes consistency and quality of 48 languages, 22 formats, 19 tooling formats , abusive copy-pastes and spelling mistakes in your repository sources, generates various reports, and can even apply formatting and auto-fixes, to ensure all your projects sources are clean, whatever IDE/toolbox are used by their developers.

Ready to use out of the box as a GitHub Action or any CI system, highly configurable and free for all uses

Screenshot Screenshot

Why Mega-Linter

Projects need to contain clean code, in order to avoid technical debt, that makes evolutive maintenance harder and time consuming.

By using code formatters and code linters, you ensure that your code base is easier to read and respects best practices, from the kick-off to each step of the project lifecycle

Not all developers have the good habit to use linters in their IDEs, making code reviews harder and longer to process

By using Mega-Linter, you'll enjoy the following benefits for you and your team:

  • At each pull request it will automatically analyze all updated code in all languages
  • Reading error logs, developers learn best practices of the language they are using
  • Mega-Linter documentation provides the list of IDE plugins integrating each linter, so developers know which linter and plugins to install
  • Mega-Linter is ready out of the box after a quick setup
  • Formatting and fixes can be automatically applied on the git branch or provided in reports
  • This tool is 100% open-source and free for all uses (personal, professional, public and private repositories)
  • Mega-Linter can run on any CI tool and be run locally: no need to authorize an external application, and your code base never leaves your tooling ecosystem

Supported Linters

All linters are integrated in the Mega-Linter docker image, which is frequently upgraded with their latest versions

Languages

Language Linter Configuration key Format/Fix
BASH bash-exec BASH_EXEC
shellcheck BASH_SHELLCHECK
shfmt BASH_SHFMT ✔
C cpplint C_CPPLINT
CLOJURE clj-kondo CLOJURE_CLJ_KONDO
COFFEE coffeelint COFFEE_COFFEELINT
C++ (CPP) cpplint CPP_CPPLINT
C# (CSHARP) dotnet-format CSHARP_DOTNET_FORMAT ✔
DART dartanalyzer DART_DARTANALYZER
GO golangci-lint GO_GOLANGCI_LINT
revive GO_REVIVE
GROOVY npm-groovy-lint GROOVY_NPM_GROOVY_LINT ✔
JAVA checkstyle JAVA_CHECKSTYLE
JAVASCRIPT eslint JAVASCRIPT_ES ✔
standard JAVASCRIPT_STANDARD ✔
prettier JAVASCRIPT_PRETTIER ✔
JSX eslint JSX_ESLINT ✔
KOTLIN ktlint KOTLIN_KTLINT ✔
LUA luacheck LUA_LUACHECK
PERL perlcritic PERL_PERLCRITIC
PHP php PHP_BUILTIN
phpcs PHP_PHPCS
phpstan PHP_PHPSTAN
psalm PHP_PSALM
POWERSHELL powershell POWERSHELL_POWERSHELL
PYTHON pylint PYTHON_PYLINT
black PYTHON_BLACK ✔
flake8 PYTHON_FLAKE8
isort PYTHON_ISORT ✔
bandit PYTHON_BANDIT
mypy PYTHON_MYPY
R lintr R_LINTR
RAKU raku RAKU_RAKU
RUBY rubocop RUBY_RUBOCOP ✔
RUST clippy RUST_CLIPPY
SALESFORCE sfdx-scanner-apex SALESFORCE_SFDX_SCANNER_APEX
sfdx-scanner-aura SALESFORCE_SFDX_SCANNER_AURA
sfdx-scanner-lwc SALESFORCE_SFDX_SCANNER_LWC
SCALA scalafix SCALA_SCALAFIX
SQL sql-lint SQL_SQL_LINT
sqlfluff SQL_SQLFLUFF
tsqllint SQL_TSQLLINT
SWIFT swiftlint SWIFT_SWIFTLINT ✔
TSX eslint TSX_ESLINT ✔
TYPESCRIPT eslint TYPESCRIPT_ES ✔
standard TYPESCRIPT_STANDARD ✔
prettier TYPESCRIPT_PRETTIER ✔
Visual Basic .NET (VBDOTNET) dotnet-format VBDOTNET_DOTNET_FORMAT ✔

Formats

Format Linter Configuration key Format/Fix
CSS stylelint CSS_STYLELINT ✔
scss-lint CSS_SCSS_LINT
ENV dotenv-linter ENV_DOTENV_LINTER ✔
GRAPHQL graphql-schema-linter GRAPHQL_GRAPHQL_SCHEMA_LINTER
HTML htmlhint HTML_HTMLHINT
JSON jsonlint JSON_JSONLINT
eslint-plugin-jsonc JSON_ESLINT_PLUGIN_JSONC ✔
v8r JSON_V8R
prettier JSON_PRETTIER ✔
LATEX chktex LATEX_CHKTEX
MARKDOWN markdownlint MARKDOWN_MARKDOWNLINT ✔
remark-lint MARKDOWN_REMARK_LINT ✔
markdown-link-check MARKDOWN_MARKDOWN_LINK_CHECK
markdown-table-formatter MARKDOWN_MARKDOWN_TABLE_FORMATTER ✔
PROTOBUF protolint PROTOBUF_PROTOLINT ✔
RST rst-lint RST_RST_LINT
rstcheck RST_RSTCHECK
rstfmt RST_RSTFMT ✔
XML xmllint XML_XMLLINT
YAML prettier YAML_PRETTIER ✔
yamllint YAML_YAMLLINT
v8r YAML_V8R

Tooling formats

Tooling format Linter Configuration key Format/Fix
ACTION actionlint ACTION_ACTIONLINT
ANSIBLE ansible-lint ANSIBLE_ANSIBLE_LINT
ARM arm-ttk ARM_ARM_TTK
CLOUDFORMATION cfn-lint CLOUDFORMATION_CFN_LINT
DOCKERFILE dockerfilelint DOCKERFILE_DOCKERFILELINT
hadolint DOCKERFILE_HADOLINT
EDITORCONFIG editorconfig-checker EDITORCONFIG_EDITORCONFIG_CHECKER
GHERKIN gherkin-lint GHERKIN_GHERKIN_LINT
KUBERNETES kubeval KUBERNETES_KUBEVAL
OPENAPI spectral OPENAPI_SPECTRAL
PUPPET puppet-lint PUPPET_PUPPET_LINT ✔
SNAKEMAKE snakemake SNAKEMAKE_LINT
snakefmt SNAKEMAKE_SNAKEFMT ✔
TEKTON tekton-lint TEKTON_TEKTON_LINT
TERRAFORM tflint TERRAFORM_TFLINT
terrascan TERRAFORM_TERRASCAN
terragrunt TERRAFORM_TERRAGRUNT ✔
terraform-fmt TERRAFORM_TERRAFORM_FMT ✔
checkov TERRAFORM_CHECKOV

Other

Code quality checker Linter Configuration key Format/Fix
COPYPASTE jscpd COPYPASTE_JSCPD
CREDENTIALS secretlint CREDENTIALS_SECRETLINT
GIT git_diff GIT_GIT_DIFF
SPELL misspell SPELL_MISSPELL ✔
cspell SPELL_CSPELL