SKILL.md
Diagnose MegaLinter configuration. Read the .mega-linter.yml (or path provided in $ARGUMENTS) and check for:
- Configuration hierarchy: Env vars override
.mega-linter.yml, which overrides descriptor defaults. Both.mega-linter.ymland.megalinter.ymlare recognized. - ENABLE/DISABLE conflicts:
ENABLELINTERS/DISABLELINTERStake precedence overENABLE/DISABLE(descriptor-level). You can't enable a linter if its descriptor is disabled. - Filter patterns: Validate
FILTERREGEXINCLUDE/FILTERREGEXEXCLUDEregex syntax - Linter variable naming: Must be UPPERCASE with
separator matching the generated nameDESCRIPTORLINTERNAME(e.g.,PYTHONPYLINTARGUMENTS, notpylint_arguments) - Flavor compatibility: If using a flavor image, verify the enabled linters exist in that flavor by checking
flavors/<flavor>/flavor.json - EXTENDS: If using remote config inheritance via HTTPS URLs, verify they're accessible
- APPLY_FIXES: Check the fix mode is compatible with the CI system — auto-commit requires write access to the branch
- Pre/Post commands: Validate
PRECOMMANDSandPOSTCOMMANDSsyntax (each needscommandandcwdfields,cwdisrootorworkspace) - Common mistakes:
- Using lowercase linter names (must be UPPERCASE) - Missing separator in linter-specific vars - Setting VALIDATEALLCODEBASE=true in CI (slow — usually want diff-only) - Forgetting {LINTER}FILTERREGEXINCLUDE/EXCLUDE overrides global filters
Reference megalinter/config.py for the full resolution logic.