megalinter-setup
MegaLinter setup
Install or upgrade MegaLinter on the current repository. Always use npx mega-linter-runner to scaffold or upgrade the configuration — never write .mega-linter.yml or CI workflow files from scratch. Only refine the generated files afterwards.
Custom flavor repositories: if — and only if — the user explicitly asks to create or maintain a custom MegaLinter flavor (their own image with just the linters they need, published from a dedicated megalinter-custom-flavor-* repository), this is a different job from the install flow below: load custom-flavor.md from this skill's directory and follow it instead. Everything else on this page targets a project that consumes MegaLinter.
1. Analyze the repository
Gather what you need to answer the installer's options:
- Flavor: detect the main technology and pick a flavor (
python,javascript,java,go,php,ruby,rust,salesforce,swift,terraform,dotnet,dotnetweb,c_cpp,documentation,formatters,security, ...). Mixed or unclear →all. - CI system: from existing config (
.github/→gitHubActions,.gitlab-ci.yml→gitLabCI,azure-pipelines.yml→azure,bitbucket-pipelines.yml→bitbucket,Jenkinsfile→jenkins,.drone.yml→droneCI) or the git remote host. None →other. - Default branch:
git remote show originor the current repository default.
2. Install or upgrade
No MegaLinter configuration yet — run the installer non-interactively: