Skip to content

Commit

Permalink
Add check executables have shebangs (in pre-commit and CI) (home-assi…
Browse files Browse the repository at this point in the history
…stant#33703)

* Add check executables have shebangs (in pre-commit and CI)

* Fix file permissions

* Adjust Azure Pipelines
  • Loading branch information
frenck authored Apr 5, 2020
1 parent f89c73d commit d33cf28
Show file tree
Hide file tree
Showing 22 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 4 additions & 0 deletions azure-pipelines-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Empty file modified homeassistant/components/dynalite/__init__.py
100755 → 100644
Empty file.
Empty file modified homeassistant/components/dynalite/bridge.py
100755 → 100644
Empty file.
Empty file modified homeassistant/components/dynalite/config_flow.py
100755 → 100644
Empty file.
Empty file modified homeassistant/components/dynalite/const.py
100755 → 100644
Empty file.
Empty file modified homeassistant/components/dynalite/dynalitebase.py
100755 → 100644
Empty file.
Empty file modified homeassistant/components/dynalite/light.py
100755 → 100644
Empty file.
Empty file modified homeassistant/components/dynalite/manifest.json
100755 → 100644
Empty file.
Empty file modified homeassistant/components/dynalite/switch.py
100755 → 100644
Empty file.
Empty file modified homeassistant/components/tankerkoenig/__init__.py
100755 → 100644
Empty file.
Empty file modified homeassistant/components/tankerkoenig/manifest.json
100755 → 100644
Empty file.
Empty file modified homeassistant/components/tankerkoenig/sensor.py
100755 → 100644
Empty file.
7 changes: 6 additions & 1 deletion script/gen_requirements_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,12 @@
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):
Expand Down
Empty file modified tests/components/alexa/test_capabilities.py
100755 → 100644
Empty file.
Empty file modified tests/components/dynalite/__init__.py
100755 → 100644
Empty file.
Empty file modified tests/components/dynalite/common.py
100755 → 100644
Empty file.
Empty file modified tests/components/dynalite/test_bridge.py
100755 → 100644
Empty file.
Empty file modified tests/components/dynalite/test_config_flow.py
100755 → 100644
Empty file.
Empty file modified tests/components/dynalite/test_init.py
100755 → 100644
Empty file.
Empty file modified tests/components/dynalite/test_light.py
100755 → 100644
Empty file.
Empty file modified tests/components/dynalite/test_switch.py
100755 → 100644
Empty file.

0 comments on commit d33cf28

Please sign in to comment.