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:
Franck Nijhof 2020-04-05 18:45:43 +02:00 committed by GitHub
parent f89c73d79d
commit d33cf28936
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
22 changed files with 11 additions and 1 deletions

View File

@ -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:

View File

@ -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
View File

0
homeassistant/components/dynalite/bridge.py Executable file → Normal file
View File

0
homeassistant/components/dynalite/config_flow.py Executable file → Normal file
View File

0
homeassistant/components/dynalite/const.py Executable file → Normal file
View File

0
homeassistant/components/dynalite/dynalitebase.py Executable file → Normal file
View File

0
homeassistant/components/dynalite/light.py Executable file → Normal file
View File

0
homeassistant/components/dynalite/manifest.json Executable file → Normal file
View File

0
homeassistant/components/dynalite/switch.py Executable file → Normal file
View File

0
homeassistant/components/tankerkoenig/__init__.py Executable file → Normal file
View File

0
homeassistant/components/tankerkoenig/manifest.json Executable file → Normal file
View File

0
homeassistant/components/tankerkoenig/sensor.py Executable file → Normal file
View File

View 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
View File

0
tests/components/dynalite/__init__.py Executable file → Normal file
View File

0
tests/components/dynalite/common.py Executable file → Normal file
View File

0
tests/components/dynalite/test_bridge.py Executable file → Normal file
View File

0
tests/components/dynalite/test_config_flow.py Executable file → Normal file
View File

0
tests/components/dynalite/test_init.py Executable file → Normal file
View File

0
tests/components/dynalite/test_light.py Executable file → Normal file
View File

0
tests/components/dynalite/test_switch.py Executable file → Normal file
View File