From 15bf3c4e750015e66d8432ebdf5068d687daa0a6 Mon Sep 17 00:00:00 2001 From: Adar Nimrod Date: Wed, 28 Jun 2017 16:23:09 +0300 Subject: [PATCH] - Added more shell scripts to pre-commit, silenced some false positives. --- .pre-commit-config.yaml | 2 +- Documents/bin/install-git-hooks | 2 +- Documents/bin/pocketchip-battery | 2 ++ Documents/bin/update-voltage | 1 + 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f0c3012..a3cd705 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,6 +9,6 @@ sha: v0.5.4 hooks: - id: shell-lint - files: &shellscripts 'bashrc|post-merge|profile|docker-|train-wifi|renew-certs|dma-clean|gen-ssh-config|dconf-load|kavim-wifi' + files: &shellscripts 'bashrc|post-merge|profile|docker-|train-wifi|renew-certs|dma-clean|gen-ssh-config|dconf-load|kavim-wifi|install-git-hooks|pocketchip-battery|update-voltage' - id: shellcheck files: *shellscripts diff --git a/Documents/bin/install-git-hooks b/Documents/bin/install-git-hooks index 1c91e81..ce11c71 100755 --- a/Documents/bin/install-git-hooks +++ b/Documents/bin/install-git-hooks @@ -2,4 +2,4 @@ set -eu cd "$HOME/.githooks" -find -type f -exec ln -sf ../../.githooks/{} ../.git/hooks/ \; +find . -type f -exec ln -sf ../../.githooks/{} ../.git/hooks/ \; diff --git a/Documents/bin/pocketchip-battery b/Documents/bin/pocketchip-battery index 6a66cfc..8f1a45d 100755 --- a/Documents/bin/pocketchip-battery +++ b/Documents/bin/pocketchip-battery @@ -3,6 +3,8 @@ set -eu current="$(cat /usr/lib/pocketchip-batt/voltage)" +# shellcheck disable=SC1090 . "$HOME/.local/voltage" +# shellcheck disable=SC2154 echo $(( 100 * (current - min) / (max - min) )) diff --git a/Documents/bin/update-voltage b/Documents/bin/update-voltage index 83e3f49..6db9a9e 100755 --- a/Documents/bin/update-voltage +++ b/Documents/bin/update-voltage @@ -21,6 +21,7 @@ then exit 0 fi +# shellcheck disable=SC1090 . "$filepath" if [ "$current" -gt "$max" ] -- GitLab