Skip to content

analyze --help says --fail-warnings exits 2, the run exits 3 #550

Open

Description

@thomasboni

What happens

plumber analyze --help describes the flag as:

--fail-warnings    Treat configuration warnings as errors (exit 2)

(cmd/analyze_gitlab.go:170 and :254, and the same text on config validate in cmd/config.go:161).

A run with --fail-warnings and at least one warning actually exits 3: the warnings exit is routed through the "could not fully verify" lane, IncompleteDataError, mapped to exit code 3 (cmd/analyze_shared.go:1060, cmd/errors.go:62-80, cmd/root.go:81). Measured on v0.6.4 and on the branch of #549: PLUMBER_DISABLE_GITHUB_API=1 plumber analyze --fail-warnings on a GitHub repository exits 3.

Why it matters

A pipeline that gates on the documented exit code 2 (or that distinguishes "configuration warnings" from "incomplete data") takes the wrong branch. The help text disagrees with the binary.

Expected

One of:

  1. the help text (and the config validate help) says exit 3 and names the lane ("a check could not be verified"), or
  2. the warnings exit gets its own code (2) distinct from the incomplete-data exit (3).

Option 1 matches the current contract (#220, platform decision row 62: exit 3 outranks --fail-warnings). Pre-existing on v0.6.4, found while testing #549.

Activity

  1. added theissue type on Oct 17, 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

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions