Skip to content

Add flag to get different result codes on warning/error #3384

Open
@SchweizS

Description

Expected Behavior

add a strict mode which changes the result codes:

result codes:

  • 0 success
  • 1 runtime error (e.g. invalid config)
  • 2 linter warning
  • 3 linter error

Current Behavior

currently there is no simple way (without looking at the output) to check if there was a warning.

result codes:

  • 0 success / linter warning
  • 1 runtimer error / linter error

Affected packages

  • cli
  • core
  • prompt
  • config-angular

Possible Solution

  1. Add a cli-option to enable strict mode.
  2. exit with 2/3 if there are warning/errors present

Context

gitlab ci job, which shows a warning for specific exit codes.

commitlint:
  [...]
  script:
    - npx commitlint
  allow_failure:
    exit_codes:
      - 2

Activity

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