1
0
mirror of https://github.com/openshift/installer.git synced 2026-02-05 15:47:14 +01:00
Files
installer/hack/yaml-lint.sh
W. Trevor King 7d15fb76ae .yamllint: Put yamllint config in the usual place
This makes the config a bit easier to read, and also supports folks
who want to run yamllint directly (without going through
hack/yaml-lint.sh).

I've added the document-start and indentation rules to avoid
complaints like:

  $ hack/yaml-lint.sh
  ...
  ./data/data/bootstrap/files/opt/tectonic/manifest-overrides/kube-proxy-daemonset.yaml
    3:1       warning  missing document start "---"  (document-start)
    23:7      error    wrong indentation: expected 8 but found 6  (indentation)
    24:9      error    wrong indentation: expected 10 but found 8  (indentation)
    31:9      error    wrong indentation: expected 10 but found 8  (indentation)
    40:9      error    wrong indentation: expected 10 but found 8  (indentation)
    49:7      error    wrong indentation: expected 8 but found 6  (indentation)
    51:7      error    wrong indentation: expected 8 but found 6  (indentation)
  ...
2018-11-07 21:26:17 -08:00

12 lines
228 B
Bash
Executable File

#!/bin/sh
if [ "$IS_CONTAINER" != "" ]; then
yamllint .
else
podman run --rm \
--env IS_CONTAINER=TRUE \
--volume "${PWD}:/workdir:z" \
--entrypoint sh \
quay.io/coreos/yamllint \
./hack/yaml-lint.sh
fi;