Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/lint-yaml.sh')
-rwxr-xr-xscripts/lint-yaml.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/scripts/lint-yaml.sh b/scripts/lint-yaml.sh
new file mode 100755
index 00000000000..c3bd7f2817e
--- /dev/null
+++ b/scripts/lint-yaml.sh
@@ -0,0 +1,10 @@
+#!/usr/bin/env bash
+
+set -euo pipefail
+
+if ! command -v yamllint > /dev/null; then
+ echo "ERROR: yamllint is not installed. For more information, see https://yamllint.readthedocs.io/en/stable/index.html."
+ exit 1
+fi
+
+yamllint --strict -f colored "$@"