• 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/build_files/fmt/buildifier/subsystem.py
1
# Copyright 2022 Pants project contributors (see CONTRIBUTORS.md).
2
# Licensed under the Apache License, Version 2.0 (see LICENSE).
3

UNCOV
4
from pants.core.util_rules.external_tool import TemplatedExternalTool
×
UNCOV
5
from pants.option.option_types import ArgsListOption, SkipOption
×
UNCOV
6
from pants.util.strutil import help_text
×
7

8

UNCOV
9
class Buildifier(TemplatedExternalTool):
×
UNCOV
10
    options_scope = "buildifier"
×
UNCOV
11
    name = "Buildifier"
×
UNCOV
12
    help = help_text(
×
13
        """
14
        Buildifier is a tool for formatting BUILD files with a standard convention.
15

16
        Pants supports running Buildifier on your Pants BUILD files for several reasons:
17
          - You might like the style that buildifier uses.
18
          - You might be incrementally adopting Pants from Bazel, and are already using buildifier.
19

20
        Please note that there are differences from Bazel's BUILD files (which are Starlark) and
21
        Pants' BUILD files (which are Python), so buildifier may issue a syntax error.
22
        In practice, these errors should be rare. See https://bazel.build/rules/language#differences_with_python.
23
        """
24
    )
25

UNCOV
26
    default_version = "8.0.3"
×
UNCOV
27
    default_known_versions = [
×
28
        "8.0.3|macos_x86_64|b7a3152cde0b3971b1107f2274afe778c5c154dcdf6c9c669a231e3c004f047e|7772208",
29
        "8.0.3|macos_arm64|674c663f7b5cd03c002f8ca834a8c1c008ccb527a0a2a132d08a7a355883b22d|7717218",
30
        "8.0.3|linux_x86_64|c969487c1af85e708576c8dfdd0bb4681eae58aad79e68ae48882c70871841b7|7876618",
31
        "8.0.3|linux_arm64|bdd9b92e2c65d46affeecaefb54e68d34c272d1f4a8c5b54929a3e92ab78820a|7754590",
32
        "7.1.2|macos_x86_64|687c49c318fb655970cf716eed3c7bfc9caeea4f2931a2fd36593c458de0c537|7591232",
33
        "7.1.2|macos_arm64|d0909b645496608fd6dfc67f95d9d3b01d90736d7b8c8ec41e802cb0b7ceae7c|7528994",
34
        "7.1.2|linux_x86_64|28285fe7e39ed23dc1a3a525dfcdccbc96c0034ff1d4277905d2672a71b38f13|7702060",
35
        "7.1.2|linux_arm64|c22a44eee37b8927167ee6ee67573303f4e31171e7ec3a8ea021a6a660040437|7568336",
36
    ]
UNCOV
37
    default_url_template = "https://github.com/bazelbuild/buildtools/releases/download/v{version}/buildifier-{platform}"
×
UNCOV
38
    default_url_platform_mapping = {
×
39
        "macos_arm64": "darwin-arm64",
40
        "macos_x86_64": "darwin-amd64",
41
        "linux_arm64": "linux-arm64",
42
        "linux_x86_64": "linux-amd64",
43
    }
44

UNCOV
45
    skip = SkipOption("fmt")
×
UNCOV
46
    args = ArgsListOption(example="-lint=fix")
×
47

48
    # NB: buildifier doesn't (yet) support config files https://github.com/bazelbuild/buildtools/issues/479
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