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

pantsbuild / pants / 25441711719

06 May 2026 02:31PM UTC coverage: 92.915%. Remained the same
25441711719

push

github

web-flow
use sha pin (with comment) format for generated actions (#23312)

Per the GitHub Action best practices we recently enabled at #23249, we
should pin each action to a SHA so that the reference is actually
immutable.

This will -- I hope -- knock out a large chunk of the 421 alerts we
currently get from zizmor. The next followup would then be upgrades and
harmonizing the generated and none-generated pins.

Notice: This idea was suggested by Claude while going over pinact output
and I was surprised to see that post processing the yaml wasn't too
gross.

92206 of 99237 relevant lines covered (92.91%)

4.04 hits per line

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

100.0
/src/python/pants/backend/cue/goals/lint.py
1
# Copyright 2023 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 collections.abc import Iterable
1✔
7
from typing import Any
1✔
8

9
from pants.backend.cue import subsystem
1✔
10
from pants.backend.cue.rules import _run_cue
1✔
11
from pants.backend.cue.subsystem import Cue
1✔
12
from pants.backend.cue.target_types import CueFieldSet
1✔
13
from pants.core.goals.lint import LintResult, LintTargetsRequest
1✔
14
from pants.core.util_rules.partitions import PartitionerType
1✔
15
from pants.core.util_rules.source_files import SourceFilesRequest, determine_source_files
1✔
16
from pants.engine.platform import Platform
1✔
17
from pants.engine.rules import Rule, collect_rules, rule
1✔
18
from pants.util.logging import LogLevel
1✔
19

20

21
class CueLintRequest(LintTargetsRequest):
1✔
22
    field_set_type = CueFieldSet
1✔
23
    tool_subsystem = Cue  # type: ignore[assignment]
1✔
24
    partitioner_type = PartitionerType.DEFAULT_SINGLE_PARTITION
1✔
25

26

27
@rule(desc="Lint with cue", level=LogLevel.DEBUG)
1✔
28
async def run_cue_vet(
1✔
29
    request: CueLintRequest.Batch[CueFieldSet, Any],
30
    cue: Cue,
31
    platform: Platform,
32
) -> LintResult:
33
    sources = await determine_source_files(
1✔
34
        SourceFilesRequest(sources_fields=[field_set.sources for field_set in request.elements])
35
    )
36
    process_result = await _run_cue("vet", cue=cue, snapshot=sources.snapshot, platform=platform)
1✔
37
    return LintResult.create(request, process_result)
1✔
38

39

40
def rules() -> Iterable[Rule]:
1✔
41
    return (
1✔
42
        *collect_rules(),
43
        *CueLintRequest.rules(),
44
        *subsystem.rules(),
45
    )
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