diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f0c301277e3fdfdab306baaed582b650fd2fb9d1..a3cd70516e599a787a55fa7153a3f291736ef730 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 1c91e81749b400e867b4ea0ceca96c78743e6a75..ce11c71a1f691a1314c2e60bbde5f807c336631a 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 6a66cfc743a007b736c6f5b8f33ec3c240e4a852..8f1a45d50eb716ffc87aa906bd785bdf6b766073 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 83e3f49a644164299f676c91c5de3dfe6980d397..6db9a9ed292cd0f3d180b231585ceab151952220 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" ]