Why Self-Host Your Linting Pipeline?
Running code quality checks on your own infrastructure gives you full control over which linters execute, how they are configured, and where the results are stored. Self-hosted linting avoids the rate limits, data privacy concerns, and vendor lock-in of cloud-based code review services.
Key benefits include:
- Privacy: Source code never leaves your network — critical for proprietary or regulated codebases
- Cost: No per-developer or per-repository licensing fees; run unlimited scans on your own hardware
- Customization: Install any linter, configure custom rulesets, and integrate with internal tooling
- Speed: Run scans on local CI runners without waiting for cloud queue times
- Offline support: Enforce code quality standards even when external services are unavailable
For teams already running self-hosted CI/CD platforms like Woodpecker or Gitea Actions, adding a self-hosted linter is a natural extension of the pipeline.
Three Approaches to Self-Hosted Linting
The self-hosted linting ecosystem offers three distinct approaches, each targeting different stages of the development workflow:
| Approach | Best For | Examples |
|---|---|---|
| All-in-one scanner | Comprehensive repo-wide analysis covering every language | MegaLinter, Super-Linter |
| Review aggregator | Consolidating results from any linter into PR comments | Reviewdog |
| Single-purpose linter | Deep analysis of one language or framework | Semgrep, ESLint, ShellCheck |
This guide focuses on the first two categories — tools that aggregate multiple linters into a single, self-hostable service. If you need deeper analysis for specific languages, our code quality comparison covers SonarQube, Semgrep, and CodeQL in detail.
MegaLinter
MegaLinter (⭐ 2,464, AGPL-3.0) is the most comprehensive open-source linting aggregator available. It bundles over 100 linters, formatters, and analysis tools into a single Docker image, scanning your entire repository for code quality, security, and formatting issues across 50+ programming languages and 22 file formats.
Key Features
- 100+ bundled tools: ShellCheck, ESLint, Pylint, Hadolint, Actionlint, Gitleaks, KICS, TruffleHog, Vale, Lychee, TFLint, Terrascan, and many more
- Multi-platform support: GitHub Actions, GitLab CI, Jenkins, Azure DevOps, Bitbucket Pipelines, or standalone Docker
- Flavors: Full image (~1GB) for maximum coverage, or language-specific flavors (JavaScript, Python, Go, Java, etc.) for faster scans
- Auto-fix mode: Automatically fixes formatting issues where tools support it
- Sarif output: Standardized security results format compatible with GitHub Code Scanning and other dashboards
- Configuration via YAML: Single
.mega-linter.ymlfile controls all behavior
Docker Deployment
MegaLinter runs as a Docker container that mounts your source code as a volume. Here is a complete Docker Compose configuration:
| |
Run the scan:
| |
Or use the quick Docker one-liner for ad-hoc scans:
| |
Configuration Example
A minimal .mega-linter.yml at the repository root:
| |
Super-Linter
Super-Linter (⭐ 145, MIT) is GitHub’s official multi-linter action. It combines many of the same tools as MegaLinter but with a more focused feature set and tighter GitHub integration. Originally a community project, it was later adopted and maintained by GitHub itself.
Key Features
- GitHub-native: First-class support for GitHub Actions with automatic PR annotations
- MIT licensed: More permissive than MegaLinter’s AGPL-3.0, allowing use in commercial projects without copyleft concerns
- Modular design: Each linter runs in its own stage, making debugging easier
- VALIDATE_ALL_CODEBASE toggle: Choose between scanning the entire repo or only changed files
- Lightweight base: Alpine Linux-based image with Python 3.12
- Extensible: Easy to add custom linters via environment variables
Docker Deployment
Super-Linter is primarily designed as a GitHub Action but runs perfectly as a standalone Docker container:
| |
For CI/CD platforms other than GitHub, you can run it with minimal configuration:
| |
The RUN_LOCAL=true flag is critical — it disables GitHub-specific features and runs the linter in standalone mode, making it suitable for GitLab CI, Jenkins, or any other pipeline.
Configuration Highlights
Super-Linter uses environment variables rather than a YAML config file. Key variables:
| Variable | Purpose | Example |
|---|---|---|
RUN_LOCAL | Enable standalone mode (non-GitHub) | true |
VALIDATE_ALL_CODEBASE | Scan entire repo vs. only changed files | true / false |
FILTER_REGEX_EXCLUDE | Exclude paths from scanning | .*vendor/.* |
FILTER_REGEX_INCLUDE | Only scan matching paths | src/.* |
LOG_LEVEL | Control verbosity | DEBUG, INFO, WARN, ERROR |
VALIDATE_<TOOL> | Enable/disable specific linters | VALIDATE_PYTHON=true |
Reviewdog
Reviewdog (⭐ 9,236, MIT) takes a fundamentally different approach. Rather than bundling linters, it acts as a thin layer that collects output from any code analysis tool and posts results as code review comments. It is the most popular of the three tools by star count and has been actively developed since 2016.
Key Features
- Tool-agnostic: Works with any linter that produces standard output — ESLint, Pylint, Go vet, custom scripts, you name it
- Review format support: Posts results as GitHub PR comments, GitLab MR notes, Bitbucket PR comments, or console output
- Filtering and deduplication: Suppresses known issues, shows only new findings on changed lines
- GitHub Apps integration: No need for personal access tokens — install as a GitHub App
- Diff-aware: Only reports issues on lines that changed in the current PR/commit
- Lightweight binary: Single Go binary, no dependencies, ~10MB download
Docker Deployment
Reviewdog provides an official Docker image for self-hosted deployment:
| |
For local development without CI integration:
| |
Workflow Integration
Reviewdog’s power comes from its integration with existing linters. Here is how it works in practice:
| |
This makes Reviewdog the ideal tool for teams that already have a mature linting setup but want centralized review commenting without switching to a monolithic scanner.
Feature Comparison
| Feature | MegaLinter | Super-Linter | Reviewdog |
|---|---|---|---|
| License | AGPL-3.0 | MIT | MIT |
| Language | Python/Docker | Shell | Go |
| GitHub Stars | 2,464 | 145 | 9,236 |
| Last Updated | Apr 2026 | Mar 2026 | Apr 2026 |
| Bundled Linters | 100+ | 50+ | 0 (brings your own) |
| Image Size | ~1 GB (full) | ~600 MB (slim) | ~20 MB |
| Standalone Docker | Yes | Yes | Yes |
| GitHub Actions | Yes | Yes (native) | Yes |
| GitLab CI | Yes | Yes | Yes |
| Auto-Fix | Yes | No | No |
| SARIF Output | Yes | Partial | No |
| PR Comments | Via reporter | Via reporter | Native |
| Diff-Aware | Partial | Partial | Yes |
| Security Scanners | Gitleaks, KICS, TruffleHog | Gitleaks, KICS | Via external tools |
| Config Format | YAML (.mega-linter.yml) | Environment variables | CLI flags |
| Min RAM | 1 GB | 512 MB | 64 MB |
How to Choose
Pick MegaLinter if:
- You want the most comprehensive coverage out of the box with zero configuration
- Your team works across many languages and you need a single scan to catch everything
- Auto-fix capability is important for maintaining consistent formatting
- You need built-in security scanners (Gitleaks, KICS, TruffleHog) alongside code linters
Pick Super-Linter if:
- You operate primarily within GitHub’s ecosystem and want native integration
- MIT licensing is required for your organization (avoiding AGPL copyleft)
- You prefer a smaller Docker image and faster scan times
- You want per-linter toggle control via environment variables
Pick Reviewdog if:
- You already have linting tools you love and want to aggregate their output
- You need diff-aware review comments that only show issues on changed lines
- You want the smallest possible footprint (~10 MB binary)
- Your team uses multiple CI platforms and needs a unified review commenting layer
Many teams combine approaches: running MegaLinter or Super-Linter for full-repo analysis in nightly builds, and Reviewdog for real-time PR review comments on every push. For teams deploying self-hosted CI agents, both patterns work seamlessly on private runners.
Performance Considerations
MegaLinter’s full image scans can take 5-15 minutes on large repositories. Use language-specific flavors to reduce scan time:
| |
Super-Linter’s slim variant excludes heavier linters (TFLint, Terrascan, Checkov) and runs in under 2 minutes for typical repositories:
| |
Reviewdog adds minimal overhead since it only parses linter output — the actual scan time depends entirely on the underlying tools you run.
FAQ
Can I run these linters without GitHub?
Yes. All three tools support standalone Docker execution. MegaLinter and Super-Linter both have a RUN_LOCAL or equivalent mode that disables GitHub-specific features. Reviewdog offers a -reporter=local flag for console output. This makes them suitable for GitLab CI, Jenkins, Bitbucket, or any pipeline that supports Docker.
Do these tools support custom linter rules?
MegaLinter allows custom configuration files for each bundled linter (e.g., .eslintrc, .pylintrc) placed in the repository root. Super-Linter picks up standard config files automatically. Reviewdog works with any linter, so you configure the linter itself, not Reviewdog.
Which tool is best for security scanning?
MegaLinter has the most comprehensive built-in security tooling, including Gitleaks (secret detection), KICS (infrastructure-as-code scanning), and TruffleHog (credential discovery). Super-Linter includes Gitleaks and KICS but fewer security-focused tools. Reviewdog can integrate with any security scanner but does not bundle them — you must bring your own.
How do I exclude files or directories from scanning?
MegaLinter uses FILTER_REGEX_EXCLUDE and FILTER_REGEX_INCLUDE in .mega-linter.yml. Super-Linter uses the same environment variables. Reviewdog delegates filtering to the underlying linter (e.g., ESLint’s .eslintignore, Pylint’s --ignore flag).
Can these tools run on self-hosted CI runners?
Absolutely. All three run as Docker containers and are designed to work on any CI platform. For self-hosted runner setup, see our guide to self-hosted CI agents. The Docker-based architecture means they work identically on GitHub-hosted runners, self-hosted runners, or bare-metal CI servers.
What happens if a linter fails the build?
MegaLinter has a DISABLE_ERRORS flag that prevents build failures. Super-Linter uses DISABLE_ERRORS=true for the same effect. Reviewdog always exits with the status of the underlying linter. In all cases, you can configure which severity levels (warning, error, info) cause a non-zero exit code.
Is there a resource difference between the tools?
MegaLinter’s full image requires at least 1 GB RAM and can use significant disk I/O when scanning large repos. Super-Linter’s slim variant runs comfortably on 512 MB. Reviewdog itself uses under 64 MB, but the underlying linters you feed it will have their own resource requirements.