rules:
- id: missing-zypper-no-confirm-switch
  severity: WARNING
  languages: [dockerfile]
  patterns:
  - pattern: |
      RUN ... zypper install ...
  - pattern-not: |
      RUN ... zypper install ... -y ...
  - pattern-not: |
      RUN ... zypper install ... --no-confirm ...
  message: >-
    This 'zypper install' is missing the '-y' switch. This might stall
    builds because it requires human intervention. Add the '-y' switch.
  metadata:
    source-rule-url: https://github.com/hadolint/hadolint/wiki/DL3034
    references:
    - https://github.com/hadolint/hadolint/wiki/DL3034
    category: best-practice
    technology:
    - dockerfile
  paths:
    include:
    - '*dockerfile*'
    - '*Dockerfile*'
