Skip to content

Latest commit

History

History
226 lines (174 loc) 路 45.3 KB

index.md

File metadata and controls

226 lines (174 loc) 路 45.3 KB

GitHub release Docker Pulls Downloads/week GitHub stars Mega-Linter codecov 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 45 languages, 22 formats, 17 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 鉁旓笍
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
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
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 鉁旓笍

Other

Code quality checker Linter Configuration key Format/Fix
COPYPASTE jscpd COPYPASTE_JSCPD
GIT git_diff GIT_GIT_DIFF
SPELL misspell SPELL_MISSPELL 鉁旓笍
cspell SPELL_CSPELL