[XS] Change in osmo-ci[master]: lint/lint_diff.sh: allow skipping with LINT=0
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/39797?usp=email ) Change subject: lint/lint_diff.sh: allow skipping with LINT=0 ...................................................................... lint/lint_diff.sh: allow skipping with LINT=0 When this script is set as pre-commit hook, it can be useful to skip the linter with this env var to make a commit that intentionally does not pass the linter (e.g. to test if it will be caught in gerrit + jenkins). There is also "git commit --no-verify", but with that the hook that applies the Change-Id does not run. Change-Id: Ia4563c13d9916a879a1e8afeacad8c541662adaa --- M lint/lint_diff.sh 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/97/39797/1 diff --git a/lint/lint_diff.sh b/lint/lint_diff.sh index 60fd8b1..6a40ba4 100755 --- a/lint/lint_diff.sh +++ b/lint/lint_diff.sh @@ -5,6 +5,11 @@ SCRIPT_DIR="$(dirname "$(realpath "$0")")" ERROR=0 +if [ "$LINT" = 0 ]; then + echo "Skipping lint_diff.sh (LINT=0)" + exit 0 +fi + check_git_dir() { if [ -z "$GIT_DIR" ]; then echo "ERROR: path is not a git repository: $PWD" -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/39797?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Ia4563c13d9916a879a1e8afeacad8c541662adaa Gerrit-Change-Number: 39797 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith@sysmocom.de>
participants (1)
-
osmith