Add check executables have shebangs (in pre-commit and CI) (#33703)
* Add check executables have shebangs (in pre-commit and CI) * Fix file permissions * Adjust Azure Pipelines
This commit is contained in:
parent
f89c73d79d
commit
d33cf28936
22 changed files with 11 additions and 1 deletions
|
@ -45,6 +45,7 @@ repos:
|
|||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v2.4.0
|
||||
hooks:
|
||||
- id: check-executables-have-shebangs
|
||||
- id: check-json
|
||||
- id: no-commit-to-branch
|
||||
args:
|
||||
|
|
|
@ -44,6 +44,10 @@ stages:
|
|||
. venv/bin/activate
|
||||
pip install -r requirements_test.txt -c homeassistant/package_constraints.txt
|
||||
pre-commit install-hooks
|
||||
- script: |
|
||||
. venv/bin/activate
|
||||
pre-commit run check-executables-have-shebangs --all-files
|
||||
displayName: 'Run executables check'
|
||||
- script: |
|
||||
. venv/bin/activate
|
||||
pre-commit run codespell --all-files
|
||||
|
|
0
homeassistant/components/dynalite/__init__.py
Executable file → Normal file
0
homeassistant/components/dynalite/__init__.py
Executable file → Normal file
0
homeassistant/components/dynalite/bridge.py
Executable file → Normal file
0
homeassistant/components/dynalite/bridge.py
Executable file → Normal file
0
homeassistant/components/dynalite/config_flow.py
Executable file → Normal file
0
homeassistant/components/dynalite/config_flow.py
Executable file → Normal file
0
homeassistant/components/dynalite/const.py
Executable file → Normal file
0
homeassistant/components/dynalite/const.py
Executable file → Normal file
0
homeassistant/components/dynalite/dynalitebase.py
Executable file → Normal file
0
homeassistant/components/dynalite/dynalitebase.py
Executable file → Normal file
0
homeassistant/components/dynalite/light.py
Executable file → Normal file
0
homeassistant/components/dynalite/light.py
Executable file → Normal file
0
homeassistant/components/dynalite/manifest.json
Executable file → Normal file
0
homeassistant/components/dynalite/manifest.json
Executable file → Normal file
0
homeassistant/components/dynalite/switch.py
Executable file → Normal file
0
homeassistant/components/dynalite/switch.py
Executable file → Normal file
0
homeassistant/components/tankerkoenig/__init__.py
Executable file → Normal file
0
homeassistant/components/tankerkoenig/__init__.py
Executable file → Normal file
0
homeassistant/components/tankerkoenig/manifest.json
Executable file → Normal file
0
homeassistant/components/tankerkoenig/manifest.json
Executable file → Normal file
0
homeassistant/components/tankerkoenig/sensor.py
Executable file → Normal file
0
homeassistant/components/tankerkoenig/sensor.py
Executable file → Normal file
|
@ -68,7 +68,12 @@ enum34==1000000000.0.0
|
|||
pycrypto==1000000000.0.0
|
||||
"""
|
||||
|
||||
IGNORE_PRE_COMMIT_HOOK_ID = ("check-json", "no-commit-to-branch", "prettier")
|
||||
IGNORE_PRE_COMMIT_HOOK_ID = (
|
||||
"check-executables-have-shebangs",
|
||||
"check-json",
|
||||
"no-commit-to-branch",
|
||||
"prettier",
|
||||
)
|
||||
|
||||
|
||||
def has_tests(module: str):
|
||||
|
|
0
tests/components/alexa/test_capabilities.py
Executable file → Normal file
0
tests/components/alexa/test_capabilities.py
Executable file → Normal file
0
tests/components/dynalite/__init__.py
Executable file → Normal file
0
tests/components/dynalite/__init__.py
Executable file → Normal file
0
tests/components/dynalite/common.py
Executable file → Normal file
0
tests/components/dynalite/common.py
Executable file → Normal file
0
tests/components/dynalite/test_bridge.py
Executable file → Normal file
0
tests/components/dynalite/test_bridge.py
Executable file → Normal file
0
tests/components/dynalite/test_config_flow.py
Executable file → Normal file
0
tests/components/dynalite/test_config_flow.py
Executable file → Normal file
0
tests/components/dynalite/test_init.py
Executable file → Normal file
0
tests/components/dynalite/test_init.py
Executable file → Normal file
0
tests/components/dynalite/test_light.py
Executable file → Normal file
0
tests/components/dynalite/test_light.py
Executable file → Normal file
0
tests/components/dynalite/test_switch.py
Executable file → Normal file
0
tests/components/dynalite/test_switch.py
Executable file → Normal file
Loading…
Add table
Reference in a new issue