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

pantsbuild / pants / 18807159280

25 Oct 2025 06:54PM UTC coverage: 43.267% (-37.0%) from 80.279%
18807159280

Pull #22800

github

web-flow
Merge 6c11b3021 into 4834308dc
Pull Request #22800: Bump the gha-deps group across 1 directory with 14 updates

25836 of 59713 relevant lines covered (43.27%)

0.87 hits per line

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

89.47
/src/python/pants/goal/builtin_goal.py
1
# Copyright 2021 Pants project contributors (see CONTRIBUTORS.md).
2
# Licensed under the Apache License, Version 2.0 (see LICENSE).
3

4
from __future__ import annotations
2✔
5

6
from abc import ABC, abstractmethod
2✔
7
from typing import ClassVar
2✔
8

9
from pants.base.exiter import ExitCode
2✔
10
from pants.base.specs import Specs
2✔
11
from pants.build_graph.build_configuration import BuildConfiguration
2✔
12
from pants.engine.goal import GoalSubsystem
2✔
13
from pants.engine.unions import UnionMembership
2✔
14
from pants.init.engine_initializer import GraphSession
2✔
15
from pants.option.options import Options
2✔
16
from pants.option.scope import ScopeInfo
2✔
17

18

19
class BuiltinGoal(ABC, GoalSubsystem):
2✔
20
    """Builtin goals have precedence over regular goal rules.
21

22
    Only a single builtin goal is executed per run, any remaining goals/arguments are passed
23
    unaltered to the builtin goal.
24

25
    When multiple builtin goals are presented, the first builtin goal will be used unless there is a
26
    builtin goal that begin with a hyphen (`-`), in which case the last such "option goal" will be
27
    prioritized. This is to support things like `./pants some-builtin-goal --help`.
28
    """
29

30
    # Used by the arg splitter to optionally allow aliasing builtin goals.
31
    aliases: ClassVar[tuple[str, ...]] = ()
2✔
32

33
    @classmethod
2✔
34
    def create_scope_info(cls, **scope_info_kwargs) -> ScopeInfo:
2✔
35
        return super().create_scope_info(is_builtin=True, **scope_info_kwargs)
×
36

37
    @abstractmethod
2✔
38
    def run(
2✔
39
        self,
40
        *,
41
        build_config: BuildConfiguration,
42
        graph_session: GraphSession,
43
        options: Options,
44
        specs: Specs,
45
        union_membership: UnionMembership,
46
    ) -> ExitCode:
47
        pass
×
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