# Super-Linter — One Linter to Rule Them All in CI > Super-Linter is a GitHub Action that bundles dozens of linters and formatters into a single container. It automatically detects languages in your repository and runs the appropriate linters, supporting over 50 languages and formats out of the box. ## Install Save in your project root: # Super-Linter — One Linter to Rule Them All in CI ## Quick Use ```yaml # .github/workflows/lint.yml name: Lint on: [push, pull_request] jobs: lint: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: fetch-depth: 0 - uses: super-linter/super-linter@v7 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} ``` ## Introduction Super-Linter is a GitHub Action maintained by the open-source community (originally created by GitHub) that packages over 50 linters into a single Docker container. It auto-detects the languages and file types in your repository and runs the matching linters, providing a one-step solution for enforcing code quality across polyglot projects. ## What Super-Linter Does - Lints code in 50+ languages including Python, JavaScript, Go, Rust, Java, and Shell - Validates configuration files for YAML, JSON, XML, Terraform, Kubernetes, and Dockerfiles - Checks markdown, natural language prose, and documentation for style issues - Runs security-focused linters like Checkov, Trivy, and gitleaks alongside code linters - Reports results as inline annotations on GitHub pull requests ## Architecture Overview Super-Linter runs as a Docker container that bundles pre-installed linters with a Bash orchestration layer. On each run, it scans the repository file tree, maps file extensions to linter configurations, and invokes each linter in sequence. Results are collected and formatted as GitHub Actions annotations, appearing directly on changed files in pull request diffs. ## Self-Hosting & Configuration - Add a single workflow YAML file to enable linting on push and pull request events - Set environment variables to enable or disable specific linters (e.g., VALIDATE_PYTHON=true) - Override default linter configurations by placing config files in the repository (e.g., .eslintrc, .pylintrc) - Use FILTER_REGEX_INCLUDE or FILTER_REGEX_EXCLUDE to limit which files are linted - Run the container locally with Docker for pre-push validation ## Key Features - Zero configuration needed for basic usage — just add the workflow file - Supports linting only changed files in pull requests for faster CI runs - Slim image variant available for reduced container size and faster startup - Works with any CI system that supports Docker, not just GitHub Actions - Active community with regular updates to bundled linter versions ## Comparison with Similar Tools - **MegaLinter** — similar multi-linter tool with a web reporting UI; Super-Linter is lighter and GitHub-native - **pre-commit** — runs hooks locally before commits; Super-Linter runs in CI after push - **trunk** — commercial dev tool with a managed linter suite; Super-Linter is fully open source - **Reviewdog** — posts lint results as PR comments; Super-Linter bundles linters and reporting together - **SonarQube** — deep analysis server with dashboards; Super-Linter is stateless and CI-first ## FAQ **Q: Does Super-Linter slow down CI?** A: Initial runs pull a large Docker image, but subsequent runs use cached layers. Linting only changed files speeds up PR checks. **Q: Can I use it outside GitHub Actions?** A: Yes. Run the Docker container directly in any CI system (GitLab CI, Jenkins, CircleCI) or locally. **Q: How do I add a custom linter?** A: Mount custom linter binaries into the container and configure them via environment variables. Community contributions for new linters are also welcome. **Q: Does it support auto-fixing?** A: Super-Linter focuses on reporting issues. For auto-fixing, run the individual linters locally with their fix flags. ## Sources - https://github.com/super-linter/super-linter - https://github.com/super-linter/super-linter/blob/main/docs/run-linter-locally.md --- Source: https://tokrepo.com/en/workflows/asset-ed3652a0 Author: AI Open Source