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

pantsbuild / pants / 22740642519

05 Mar 2026 11:00PM UTC coverage: 52.677% (-40.3%) from 92.931%
22740642519

Pull #23157

github

web-flow
Merge 2aa18e6d4 into f0030f5e7
Pull Request #23157: [pants ng] Partition source files by config.

31678 of 60136 relevant lines covered (52.68%)

0.53 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
1✔
5

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

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

18

19
class BuiltinGoal(ABC, GoalSubsystem):
1✔
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, ...]] = ()
1✔
32

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

37
    @abstractmethod
1✔
38
    def run(
1✔
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