Skip to content

shell: shellcheck enable=all (minus noisy checks), style fails, require set -euo pipefail #14676

Open

Description

@TrapsterDK

Where

  • quality/adapter/src/commands.rs:312-313, 2610-2625: shellcheck runs --format=gcc --norc; no --enable, no external-sources.
  • quality/adapter/src/commands.rs:294-295: shfmt -d/-w only.
  • quality/adapter/src/parsers/shellcheck.rs:20-26: style and info map to info, so they never fail.
  • quality/tools.bzl:2293-2325: shellcheck and shfmt, no severity(). No shellcheck tier files.
  • docs/cli/commands/quality.md:160, 428.

Fix

Guard rules (do first):

  • Style findings fail: severity(default = "warning"). Covers SC2086, SC2046, SC2155, SC2164, SC2162, SC2068, SC2115, SC2012, SC2181, SC2148, SC2230, SC3xxx bashisms.
  • Optional checks on: add-default-case, check-extra-masked-returns, check-set-e-suppressed, check-unassigned-uppercase, deprecate-which.
  • Check: bash scripts start with set -euo pipefail; sh scripts with set -eu.
  • # shellcheck disable= needs a reason comment.

Then:

  • New quality/tiers/shellcheck/{standard,strict}.shellcheckrc with the optional checks and external-sources=true. Run with --check-sourced.
  • shfmt adds -s and -ln from the shebang.
  • Document in quality.md.

Excluded

require-variable-braces, quote-safe-variables, avoid-negated-conditions, avoid-nullary-conditions, useless-use-of-cat, require-double-brackets. shfmt -mn, -bn, -ci, -sr. IFS header.

Test

  • commands_tests.rs argv assertions for shellcheck and shfmt.
  • Negative fixture per guard SC code and for a missing set -euo pipefail fails dx lint. A style finding exits 1.
  • Clean fixture passes. tier = "standard" still passes.

Verify every rule ID and flag against the pinned tool version before landing; some come from memory.

Part of #14647

Activity

  1. added
    cloud-pool
    on Nov 22, 2026
  2. TrapsterDK commented on Nov 22, 2026

    @TrapsterDK
    CollaboratorAuthor

    cloud-claim 0f3a85bc


    Generated by Claude Code

  3. added
    cloud-taken
    and removed
    cloud-pool
    on Nov 22, 2026
  4. TrapsterDK commented on Nov 22, 2026

    @TrapsterDK
    CollaboratorAuthor

    cloud-claim 1b70fa00


    Generated by Claude Code

  5. TrapsterDK commented on Nov 22, 2026

    @TrapsterDK
    CollaboratorAuthor

    Paths in this issue are from an old layout. Branch from origin/main; quality code is in core/quality/, wrappers in /private/. Rebase on #14647 (strict default) and #14685 (severity floor).

    🤖 Generated with Claude Code

  6. TrapsterDK commented on Nov 22, 2026

    @TrapsterDK
    CollaboratorAuthor

    Next slice: #14709 lands the severity map, external-sources, strict optional checks and shfmt -s. Left: the guard checks (bash scripts start with set -euo pipefail, sh with set -eu; # shellcheck disable= needs a reason) need the shared agent-guard hook from #14647 item 6; --check-sourced needs the shellcheck parser to accept findings in sourced files that were not passed in; negative fixtures per guard SC code.


    Generated by Claude Code

  7. added
    cloud-pool
    and removed
    cloud-taken
    on Nov 23, 2026
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

    cloud-pool

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions