• 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/shell/lint/shellcheck/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
import os.path
×
UNCOV
7
from collections.abc import Iterable
×
8

UNCOV
9
from pants.core.util_rules.config_files import ConfigFilesRequest
×
UNCOV
10
from pants.core.util_rules.external_tool import TemplatedExternalTool
×
UNCOV
11
from pants.engine.platform import Platform
×
UNCOV
12
from pants.option.option_types import ArgsListOption, BoolOption, SkipOption
×
UNCOV
13
from pants.util.strutil import softwrap
×
14

15

UNCOV
16
class Shellcheck(TemplatedExternalTool):
×
UNCOV
17
    options_scope = "shellcheck"
×
UNCOV
18
    name = "Shellcheck"
×
UNCOV
19
    help = "A linter for shell scripts."
×
20

UNCOV
21
    default_version = "v0.10.0"
×
UNCOV
22
    default_known_versions = [
×
23
        "v0.10.0|macos_arm64 |bbd2f14826328eee7679da7221f2bc3afb011f6a928b848c80c321f6046ddf81|7205756",
24
        "v0.10.0|macos_x86_64|ef27684f23279d112d8ad84e0823642e43f838993bbb8c0963db9b58a90464c2|4371632",
25
        "v0.10.0|linux_arm64 |324a7e89de8fa2aed0d0c28f3dab59cf84c6d74264022c00c22af665ed1a09bb|4291764",
26
        "v0.10.0|linux_x86_64|6c881ab0698e4e6ea235245f22832860544f17ba386442fe7e9d629f8cbedf87|2404716",
27
    ]
28

UNCOV
29
    default_url_template = (
×
30
        "https://github.com/koalaman/shellcheck/releases/download/{version}/shellcheck-"
31
        "{version}.{platform}.tar.xz"
32
    )
UNCOV
33
    default_url_platform_mapping = {
×
34
        "macos_arm64": "darwin.aarch64",
35
        "macos_x86_64": "darwin.x86_64",
36
        "linux_arm64": "linux.aarch64",
37
        "linux_x86_64": "linux.x86_64",
38
    }
39

UNCOV
40
    skip = SkipOption("lint")
×
UNCOV
41
    args = ArgsListOption(example="-e SC20529")
×
UNCOV
42
    config_discovery = BoolOption(
×
43
        default=True,
44
        advanced=True,
45
        help=softwrap(
46
            """
47
            If true, Pants will include all relevant `.shellcheckrc` and `shellcheckrc` files
48
            during runs. See https://www.mankier.com/1/shellcheck#RC_Files for where these
49
            can be located.
50
            """
51
        ),
52
    )
53

UNCOV
54
    def generate_exe(self, _: Platform) -> str:
×
55
        return f"./shellcheck-{self.version}/shellcheck"
×
56

UNCOV
57
    def config_request(self, dirs: Iterable[str]) -> ConfigFilesRequest:
×
58
        # Refer to https://www.mankier.com/1/shellcheck#RC_Files for how config files are
59
        # discovered.
60
        candidates = []
×
61
        for d in ("", *dirs):
×
62
            candidates.append(os.path.join(d, ".shellcheckrc"))
×
63
            candidates.append(os.path.join(d, "shellcheckrc"))
×
64
        return ConfigFilesRequest(discovery=self.config_discovery, check_existence=candidates)
×
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

© 2025 Coveralls, Inc