Skip to content

ci(lint): require cross-platform Dylint on ordinary PRs and fail local skips #274

Closed

Description

@zackees

Context

The current ordinary PR always invokes Linux x86 lint, which calls the reusable lint workflow and runs real Dylint. Windows x86 lint and macOS ARM/x86 lint require the ci-full label, so an ordinary unlabelled PR can merge without Dylint evaluating code selected on those hosts. Linux ARM lint is also label-gated. This is especially relevant because release builds include all three OS families.

The local ./lint runs real cargo-dylint when prerequisites exist, and fails if they are missing in CI. On a local host with missing or wrong-version cargo-dylint, or missing rustup, it prints dylint not run and exits 0. Thus a green full local lint can omit the custom ban_std_pathbuf check. #262 requested a nonzero exit for this case but the current implementation returns 0.

Cross-target Clippy in forge-ci/soldr#3392 does not address this: Dylint remains host-only.

Proposal

Make actual custom Dylint a required ordinary PR check for supported Linux, Windows, and macOS selected Rust code, using native OS jobs or a cross-target method proven to lint the corresponding cfg modules. Retain the existing pinned nightly and reusable _lint.yml bootstrap. Make full local ./lint fail with an actionable prerequisite error when Dylint cannot run; preserve the other lint stages and document any deliberately partial command separately.

Acceptance criteria

  • RED → GREEN: add a focused CI policy test that fails while Windows/macOS Dylint jobs are label-gated, plus a local-shell test that fails while missing Dylint prerequisites produce exit 0. Make both pass with the implementation.
  • On an ordinary unlabelled PR, real custom Dylint runs for Linux, Windows, and macOS selected code. A representative violation inside each OS-specific cfg module fails the corresponding required check before the violation is removed; the check passes afterward. The overall required gate fails on a skipped or failed OS leg. Confirm whether Linux ARM or other architecture-gated source needs a separate Dylint proof, and cover it if so.
  • Full local ./lint on each supported host runs the custom Dylint and fails for a representative violation. Missing cargo-dylint, wrong version, missing rustup, or incompatible nightly fails with a clear install/repair message after the independent lint stages complete; it never reports overall lint success.
  • Verify the pinned nightly/driver setup works on the native CI runners. Keep existing Python, rustfmt, and Clippy coverage.

Decisions

  • Priority: P1. Standard PR validation can miss platform-specific custom lint findings.
  • Fix location: FastLED/cli. This is a workflow gate and local-script exit-code gap; soldr#3392 only adds cross-target Clippy.
  • CI design: reuse _lint.yml and remove the platform Dylint gating that makes ordinary PRs omit it. Keep any unrelated ci-full policy intact.

Related issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions