File tree Expand file tree Collapse file tree 6 files changed +18
-7
lines changed
Expand file tree Collapse file tree 6 files changed +18
-7
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,13 @@ repos:
5555 hooks :
5656 - id : yamllint
5757 name : " YAML linting"
58+ - repo : https://github.com/shellcheck-py/shellcheck-py
59+ rev : v0.10.0.1
60+ hooks :
61+ - id : shellcheck
62+ name : " Shell checking"
63+ args :
64+ - --external-sources
5865 - repo : https://github.com/cdce8p/python-typing-update
5966 rev : v0.7.2
6067 hooks :
Original file line number Diff line number Diff line change @@ -4,13 +4,15 @@ set -eu
44my_path=$( git rev-parse --show-toplevel)
55
66if [ -n " ${VIRTUAL_ENV-} " ] && [ -f " ${VIRTUAL_ENV} /bin/activate" ]; then
7+ # shellcheck disable=SC1091 # ingesting virtualenv
78 . " ${VIRTUAL_ENV} /bin/activate"
89else
910 # other common virtualenvs
1011 my_path=$( git rev-parse --show-toplevel)
1112
1213 for venv in venv .venv . ; do
1314 if [ -f " ${my_path} /${venv} /bin/activate" ]; then
15+ # shellcheck disable=SC1090 # ingesting virtualenv
1416 . " ${my_path} /${venv} /bin/activate"
1517 break
1618 fi
Original file line number Diff line number Diff line change @@ -15,13 +15,15 @@ if [ -s .python-version ]; then
1515fi
1616
1717if [ -n " ${VIRTUAL_ENV-} " ] && [ -f " ${VIRTUAL_ENV} /bin/activate" ]; then
18+ # shellcheck disable=SC1091 # ingesting virtualenv
1819 . " ${VIRTUAL_ENV} /bin/activate"
1920else
2021 # other common virtualenvs
2122 my_path=$( git rev-parse --show-toplevel)
2223
2324 for venv in venv .venv . ; do
2425 if [ -f " ${my_path} /${venv} /bin/activate" ]; then
26+ # shellcheck disable=SC1090 # ingesting virtualenv
2527 . " ${my_path} /${venv} /bin/activate"
2628 break
2729 fi
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
2- # 20250613 Copied from HA-core and adjusted
2+ # 20250613 Copied from HA-core and shell-check adjusted and modified for local use
33set -e
44
5- my_path=$( git rev-parse --show-toplevel)
6-
7- if [ ! -n " $VIRTUAL_ENV " ]; then
5+ if [ -z " $VIRTUAL_ENV " ]; then
86 if [ -x " $( command -v uv) " ]; then
97 uv venv venv
108 else
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
2- # 20250613 Copied from HA-core and adjusted
2+ # 20250613 Copied from HA-core and shell-check adjusted and modified for local use
33set -e
44
55my_path=$( git rev-parse --show-toplevel)
66
7- if [ ! -n " $VIRTUAL_ENV " ]; then
7+ if [ -z " $VIRTUAL_ENV " ]; then
88 if [ -x " $( command -v uv) " ]; then
99 uv venv venv
1010 else
Original file line number Diff line number Diff line change 1- #! /usr/bin/env sh
1+ #! /usr/bin/env bash
22# 20250613 Copied from HA-Core: run-in-env.sh
33set -eu
44
@@ -15,13 +15,15 @@ if [ -s .python-version ]; then
1515fi
1616
1717if [ -n " ${VIRTUAL_ENV-} " ] && [ -f " ${VIRTUAL_ENV} /bin/activate" ]; then
18+ # shellcheck disable=SC1091 # ingesting virtualenv
1819 . " ${VIRTUAL_ENV} /bin/activate"
1920else
2021 # other common virtualenvs
2122 my_path=$( git rev-parse --show-toplevel)
2223
2324 for venv in venv .venv . ; do
2425 if [ -f " ${my_path} /${venv} /bin/activate" ]; then
26+ # shellcheck disable=SC1090 # ingesting virtualenv
2527 . " ${my_path} /${venv} /bin/activate"
2628 break
2729 fi
You can’t perform that action at this time.
0 commit comments