Skip to content

--failure-threshold does not work as expected (exits 0) if set to level: 'error' #651

@Dentrax

Description

@Dentrax
  • This is a bug report
  • This is a feature request
  • I searched existing issues before opening this one

Expected behavior

It should exit with 1.

Actual behavior

It exits with 0.

Steps to reproduce the behavior

  1. $ hadolint --failure-threshold error --verbose ./Dockerfile
  2. echo $? # prints 0
No configuration was specified. Using default configuration
./Dockerfile:8 DL3020 error: Use COPY instead of ADD for files and folders
./Dockerfile:10 DL3000 error: Use absolute WORKDIR
./Dockerfile:19 DL3008 warning: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`
...

Output of hadolint --version:

Haskell Dockerfile Linter 2.4.1-no-git

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