You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running in CI pipelines typically uses the exit code to determine if a step has failed. In some cases, some rules from dockerfilelint may be permissable by some projects. Thus, dockerfilelint should expose in it's RC file the ability to specify a severity level (Similar to eslint perhaps) instead of just a boolean "on/off". This way, variations of rules can be configured for individual use cases.
Perhaps something like:
rules:
uppercase_commands: "ERROR"
expose_port_valid: "WARNING"
label_format: "INFO"
base_image_tag: on
If issues are found of severity level INFO/WARNING, then this should keep the exit code at 0. However, if at least one issue is found that has a severity level of error, the exit code should be > 0.
The default severity level, if not provided or using the old "on/off" syntax, should be ERROR to maintain backward compatibility.
Running in CI pipelines typically uses the exit code to determine if a step has failed. In some cases, some rules from dockerfilelint may be permissable by some projects. Thus, dockerfilelint should expose in it's RC file the ability to specify a severity level (Similar to eslint perhaps) instead of just a boolean "on/off". This way, variations of rules can be configured for individual use cases.
Perhaps something like:
If issues are found of severity level INFO/WARNING, then this should keep the exit code at 0. However, if at least one issue is found that has a severity level of error, the exit code should be > 0.
The default severity level, if not provided or using the old "on/off" syntax, should be ERROR to maintain backward compatibility.
I've solved this issue in my fork here: https://github.com/amthorn/dockerfilelint/tree/specify_severity
I'll submit a PR as soon as #172 is reviewed/merged as there is a dependency on that PR. Here's the diff: amthorn/dockerfilelint@add_custom_rulesets...amthorn:specify_severity
The text was updated successfully, but these errors were encountered: