Flake8 vs Hadolint
Flake8
flake8.pycqa.orgHadolint
github.comSide by side
| Figure | Flake8 | Hadolint |
|---|---|---|
| Price from | Free | Free |
| Free plan | Yes | Yes |
| Free trial | — | — |
| Open source | Yes | — |
| Web | — | Yes |
| Windows | Yes | Yes |
| macOS | Yes | Yes |
| Linux | Yes | Yes |
| API | Yes | — |
| Self-hosted | Yes | — |
| Plans published | 2 | 1 |
| Spec score · Linters | 8.8 (#2) | 7.9 (#13) |
| Configuration | Project configuration can be stored in setup.cfg, tox.ini, or .flake8 using INI format. | Users can configure ignored rules, severity overrides, failure thresholds, output format, label schemas, and trusted registries. |
| Latest release | PyPI lists version 7.4.1 uploaded on September 23, 2026. | The release page opened for this research lists v2.15.1 as the latest release. |
| Pre-commit | Flake8 can be included as a hook in the pre-commit Git hooks framework. | Hadolint is available as a pre-commit hook, including a Docker-based hook option. |
| Purpose | Flake8 combines pycodestyle, pyflakes, McCabe, and third-party plugins to check Python code style and quality. | Hadolint is a Dockerfile linter that checks Dockerfiles for errors and best practices. |
Plans
In their own words
Hadolint
Hadolint is a free Dockerfile linter that parses files into an abstract syntax tree and checks that structure for errors and stated best practices. It uses ShellCheck to inspect Bash code inside Dockerfile RUN instructions. Rules carry either the DL prefix for Hadolint checks or SC for ShellCheck checks. Users can ignore rules, override severity, set failure thresholds, choose report formats, and configure label schemas and trusted registries. Output formats include tty, JSON, Checkstyle, Code Climate, GitLab Code Climate, GNU, Codacy, SonarQube, SARIF, and JUnit. Hadolint runs in Docker or Podman containers and is available as a pre-commit hook. Prebuilt binaries support Linux, macOS, and Windows; installation options include Homebrew, Scoop, Nix, containers, and source builds. Documented integrations cover major CI systems and editors. An online version is hosted at hadolint.github.io/hadolint. The latest listed release is v2.15.1, under GPL-3.0.