Skip to content

Activation and deactivation

MegaLinter has all linters enabled by default, but allows enabling or disabling specific ones.

  • If ENABLE isn't set, all descriptors are activated by default. If set, all linters of listed descriptors are activated by default.
  • If ENABLE_LINTERS is set, only the listed linters are processed.
  • If DISABLE is set, the linters in the listed descriptors are skipped.
  • If DISABLE_LINTERS is set, the listed linters are skipped.
  • If DISABLE_ERRORS_LINTERS is set, the listed linters will run, but if errors are found, they will be considered non-blocking.
  • If ENABLE_ERRORS_LINTERS is set, only the linters in this list will be considered blocking.

Examples:

  • Run all javascript and groovy linters except STANDARD javascript linter. DevSkim errors will be non-blocking
ENABLE: JAVASCRIPT,GROOVY
DISABLE_LINTERS: JAVASCRIPT_STANDARD
DISABLE_ERRORS_LINTERS: REPOSITORY_DEVSKIM
  • Run all matching linters but only trivy is blocking
ENABLE_ERRORS_LINTERS: REPOSITORY_TRIVY
  • Run all linters except PHP linters (PHP_BUILTIN, PHP_PHPCS, PHP_PHPSTAN, PHP_PSALM)
DISABLE: PHP
  • Run all linters except PHP_PHPSTAN and PHP_PSALM linters
DISABLE_LINTERS:
  - PHP_PHPSTAN
  - PHP_PSALM