From b633bd6213db569ed4431886e9f0f6c052f054d6 Mon Sep 17 00:00:00 2001 From: Adar Nimrod <nimrod@shore.co.il> Date: Mon, 12 Dec 2016 01:25:18 +0200 Subject: [PATCH] - Added shell script linter pre-commit check. --- .pre-commit-config.yaml | 4 ++++ files/backup.sh | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 233bc80..01fddc1 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,6 +16,10 @@ files: tests/playbook.yml args: - tests/playbook.yml +- repo: https://github.com/adarnimrod/shell-pre-commit + sha: v0.1.0 + hooks: + - id: shell-lint - repo: https://github.com/willthames/ansible-lint sha: 959ab0f525e9abb19cf75f34381015cf33695f61 hooks: diff --git a/files/backup.sh b/files/backup.sh index bd20741..cdf2e5c 100644 --- a/files/backup.sh +++ b/files/backup.sh @@ -1,3 +1,4 @@ -#!/bin/sh -e +#!/bin/sh +set -eu cd /srv/git tar -cf /var/backups/git.tar.gz repositories -- GitLab