• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pantsbuild / pants / 19015773527

02 Nov 2025 05:33PM UTC coverage: 17.872% (-62.4%) from 80.3%
19015773527

Pull #22816

github

web-flow
Merge a12d75757 into 6c024e162
Pull Request #22816: Update Pants internal Python to 3.14

4 of 5 new or added lines in 3 files covered. (80.0%)

28452 existing lines in 683 files now uncovered.

9831 of 55007 relevant lines covered (17.87%)

0.18 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/python/pants/backend/docker/lint/hadolint/subsystem.py
1
# Copyright 2021 Pants project contributors (see CONTRIBUTORS.md).
2
# Licensed under the Apache License, Version 2.0 (see LICENSE).
3

UNCOV
4
from __future__ import annotations
×
5

UNCOV
6
from pants.core.util_rules.config_files import ConfigFilesRequest
×
UNCOV
7
from pants.core.util_rules.external_tool import TemplatedExternalTool
×
UNCOV
8
from pants.option.option_types import ArgsListOption, BoolOption, FileOption, SkipOption
×
UNCOV
9
from pants.util.strutil import softwrap
×
10

11

UNCOV
12
class Hadolint(TemplatedExternalTool):
×
UNCOV
13
    options_scope = "hadolint"
×
UNCOV
14
    name = "Hadolint"
×
UNCOV
15
    help = "A linter for Dockerfiles."
×
16

UNCOV
17
    default_version = "v2.12.1-beta"
×
UNCOV
18
    default_known_versions = [
×
19
        "v2.12.1-beta|macos_x86_64 |911008b09e88b9ce62dbd12345af8f4c933370ebcfb01211d934f1e0a4d9aecc|19743768",
20
        "v2.12.1-beta|macos_arm64 |911008b09e88b9ce62dbd12345af8f4c933370ebcfb01211d934f1e0a4d9aecc|19743768",  # same as mac x86
21
        "v2.12.1-beta|linux_x86_64|d0779284293475905cfa4b3a7b5c433eca6d731e45b5df0e157f46b4e6311888|2426420",
22
        "v2.12.1-beta|linux_arm64 |5997119de9b8332a003be938baff3ebd2ff17dfb62e2bceccd59bd9c112599ce|24002600",
23
    ]
UNCOV
24
    default_url_template = (
×
25
        "https://github.com/hadolint/hadolint/releases/download/{version}/hadolint-{platform}"
26
    )
UNCOV
27
    default_url_platform_mapping = {
×
28
        "macos_arm64": "Darwin-x86_64",
29
        "macos_x86_64": "Darwin-x86_64",
30
        "linux_arm64": "Linux-arm64",
31
        "linux_x86_64": "Linux-x86_64",
32
    }
33

UNCOV
34
    skip = SkipOption("lint")
×
UNCOV
35
    args = ArgsListOption(example="--format json")
×
UNCOV
36
    config = FileOption(
×
37
        default=None,
38
        advanced=True,
39
        help=lambda cls: softwrap(
40
            f"""
41
            Path to an YAML config file understood by Hadolint
42
            (https://github.com/hadolint/hadolint#configure).
43

44
            Setting this option will disable `[{cls.options_scope}].config_discovery`. Use
45
            this option if the config is located in a non-standard location.
46
            """
47
        ),
48
    )
UNCOV
49
    config_discovery = BoolOption(
×
50
        default=True,
51
        advanced=True,
52
        help=lambda cls: softwrap(
53
            f"""
54
            If true, Pants will include all relevant config files during runs
55
            (`.hadolint.yaml` and `.hadolint.yml`).
56

57
            Use `[{cls.options_scope}].config` instead if your config is in a
58
            non-standard location.
59
            """
60
        ),
61
    )
62

UNCOV
63
    def config_request(self) -> ConfigFilesRequest:
×
64
        # Refer to https://github.com/hadolint/hadolint#configure for how config files are
65
        # discovered.
66
        return ConfigFilesRequest(
×
67
            specified=self.config,
68
            specified_option_name=f"[{self.options_scope}].config",
69
            discovery=self.config_discovery,
70
            check_existence=[".hadolint.yaml", ".hadolint.yml"],
71
        )
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc