Skip to content

Home

Verify your code consistency with an open-source tool.
Powered by OX Security.

GitHub release Docker Pulls Downloads/week GitHub stars Dependents GitHub contributors PRs Welcome

MegaLinter is an Open-Source tool for CI/CD workflows that analyzes the consistency of your code, IAC, configuration, and scripts in your repository sources, to ensure all your projects sources are clean and formatted whatever IDE/toolbox is used by their developers, powered by OX Security.

Supporting 55 languages, 24 formats, 20 tooling formats and ready to use out of the box, as a GitHub action or any CI system highly configurable and free for all uses.

Switch to MegaLinter v7 !

Upgrade to v7 Video


_**See Article on Medium**_

_**See Article on Medium**_


Process

Archi


Console reporter

Screenshot


Github PR reporter

Screenshot

Why MegaLinter

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 MegaLinter, 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're using
  • MegaLinter documentation provides the list of IDE plugins integrating each linter, so developers know which linter and plugins to install
  • MegaLinter 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)
  • MegaLinter 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 MegaLinter docker image, which is frequently upgraded with their latest versions

Languages

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

Formats

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

Tooling formats

Tooling format Linter Additional
ACTION actionlint
ACTION_ACTIONLINT
GitHub stars
ANSIBLE ansible-lint
ANSIBLE_ANSIBLE_LINT
downgraded version GitHub stars sarif
ARM arm-ttk
ARM_ARM_TTK
GitHub stars
BICEP bicep_linter
BICEP_BICEP_LINTER
GitHub stars
CLOUDFORMATION cfn-lint
CLOUDFORMATION_CFN_LINT
GitHub stars sarif
DOCKERFILE hadolint
DOCKERFILE_HADOLINT
GitHub stars sarif
EDITORCONFIG editorconfig-checker
EDITORCONFIG_EDITORCONFIG_CHECKER
GitHub stars
GHERKIN gherkin-lint
GHERKIN_GHERKIN_LINT
GitHub stars
KUBERNETES kubeconform
KUBERNETES_KUBECONFORM
GitHub stars
KUBERNETES helm
KUBERNETES_HELM
GitHub stars
KUBERNETES kubescape
KUBERNETES_KUBESCAPE
GitHub stars sarif
OPENAPI spectral
OPENAPI_SPECTRAL
GitHub stars
PUPPET puppet-lint
PUPPET_PUPPET_LINT
GitHub stars autofix
SNAKEMAKE snakemake
SNAKEMAKE_LINT
GitHub stars
SNAKEMAKE snakefmt
SNAKEMAKE_SNAKEFMT
GitHub stars formatter
TEKTON tekton-lint
TEKTON_TEKTON_LINT
GitHub stars
TERRAFORM tflint
TERRAFORM_TFLINT
GitHub stars sarif
TERRAFORM terrascan
TERRAFORM_TERRASCAN
GitHub stars sarif
TERRAFORM terragrunt
TERRAFORM_TERRAGRUNT
GitHub stars autofix
TERRAFORM terraform-fmt
TERRAFORM_TERRAFORM_FMT
GitHub stars formatter

Other

Code quality checker Linter Additional
COPYPASTE jscpd
COPYPASTE_JSCPD
GitHub stars
REPOSITORY checkov
REPOSITORY_CHECKOV
GitHub stars sarif
REPOSITORY devskim
REPOSITORY_DEVSKIM
downgraded version GitHub stars sarif
REPOSITORY dustilock
REPOSITORY_DUSTILOCK
GitHub stars sarif
REPOSITORY git_diff
REPOSITORY_GIT_DIFF
GitHub stars
REPOSITORY gitleaks
REPOSITORY_GITLEAKS
GitHub stars sarif
REPOSITORY kics
REPOSITORY_KICS
GitHub stars sarif
REPOSITORY secretlint
REPOSITORY_SECRETLINT
GitHub stars sarif
REPOSITORY semgrep
REPOSITORY_SEMGREP
GitHub stars sarif
REPOSITORY syft
REPOSITORY_SYFT
GitHub stars sarif
REPOSITORY trivy
REPOSITORY_TRIVY
GitHub stars sarif
SPELL cspell
SPELL_CSPELL
GitHub stars
SPELL proselint
SPELL_PROSELINT
GitHub stars
SPELL vale
SPELL_VALE
GitHub stars