-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Martin Hjelmare <[email protected]>
- Loading branch information
1 parent
77ebbfb
commit 665dd59
Showing
19 changed files
with
333 additions
and
163 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,101 @@ | ||
# See https://pre-commit.com for more information | ||
# See https://pre-commit.com/hooks.html for more hooks | ||
repos: | ||
- repo: https://github.com/psf/black | ||
rev: 23.1.0 | ||
hooks: | ||
- id: black | ||
args: | ||
- --quiet | ||
files: ^(matter_server|scripts)/.+\.py$ | ||
- repo: https://github.com/codespell-project/codespell | ||
rev: v2.2.4 | ||
- repo: local | ||
hooks: | ||
- id: ruff-check | ||
name: 🐶 Ruff Linter | ||
language: system | ||
types: [python] | ||
entry: scripts/run-in-env.sh ruff check --fix | ||
require_serial: true | ||
stages: [commit, push, manual] | ||
- id: ruff-format | ||
name: 🐶 Ruff Formatter | ||
language: system | ||
types: [python] | ||
entry: scripts/run-in-env.sh ruff format | ||
require_serial: true | ||
stages: [commit, push, manual] | ||
- id: check-ast | ||
name: 🐍 Check Python AST | ||
language: system | ||
types: [python] | ||
entry: scripts/run-in-env.sh check-ast | ||
- id: check-case-conflict | ||
name: 🔠 Check for case conflicts | ||
language: system | ||
entry: scripts/run-in-env.sh check-case-conflict | ||
- id: check-docstring-first | ||
name: ℹ️ Check docstring is first | ||
language: system | ||
types: [python] | ||
entry: scripts/run-in-env.sh check-docstring-first | ||
- id: check-executables-have-shebangs | ||
name: 🧐 Check that executables have shebangs | ||
language: system | ||
types: [text, executable] | ||
entry: scripts/run-in-env.sh check-executables-have-shebangs | ||
stages: [commit, push, manual] | ||
- id: check-json | ||
name: { Check JSON files | ||
language: system | ||
types: [json] | ||
entry: scripts/run-in-env.sh check-json | ||
- id: check-merge-conflict | ||
name: 💥 Check for merge conflicts | ||
language: system | ||
types: [text] | ||
entry: scripts/run-in-env.sh check-merge-conflict | ||
- id: check-symlinks | ||
name: 🔗 Check for broken symlinks | ||
language: system | ||
types: [symlink] | ||
entry: scripts/run-in-env.sh check-symlinks | ||
- id: check-toml | ||
name: ✅ Check TOML files | ||
language: system | ||
types: [toml] | ||
entry: scripts/run-in-env.sh check-toml | ||
- id: codespell | ||
args: [] | ||
exclude_types: [csv, json] | ||
exclude: ^tests/fixtures/ | ||
additional_dependencies: | ||
- tomli | ||
- repo: https://github.com/PyCQA/flake8 | ||
rev: 6.0.0 | ||
hooks: | ||
- id: flake8 | ||
files: ^(matter_server|scripts)/.+\.py$ | ||
- repo: https://github.com/PyCQA/isort | ||
rev: 5.12.0 | ||
hooks: | ||
- id: isort | ||
files: ^(matter_server|scripts)/.+\.py$ | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.4.0 | ||
hooks: | ||
name: ✅ Check code for common misspellings | ||
language: system | ||
types: [text] | ||
entry: scripts/run-in-env.sh codespell | ||
- id: detect-private-key | ||
name: 🕵️ Detect Private Keys | ||
language: system | ||
types: [text] | ||
entry: scripts/run-in-env.sh detect-private-key | ||
- id: end-of-file-fixer | ||
name: ⮐ Fix End of Files | ||
language: system | ||
types: [text] | ||
entry: scripts/run-in-env.sh end-of-file-fixer | ||
stages: [commit, push, manual] | ||
- id: no-commit-to-branch | ||
name: 🛑 Don't commit to main branch | ||
language: system | ||
entry: scripts/run-in-env.sh no-commit-to-branch | ||
pass_filenames: false | ||
always_run: true | ||
args: | ||
- --branch=main | ||
- id: pylint | ||
name: 🌟 Starring code with pylint | ||
language: system | ||
types: [python] | ||
entry: scripts/run-in-env.sh pylint | ||
- id: trailing-whitespace | ||
- repo: local | ||
hooks: | ||
name: ✄ Trim Trailing Whitespace | ||
language: system | ||
types: [text] | ||
entry: scripts/run-in-env.sh trailing-whitespace-fixer | ||
stages: [commit, push, manual] | ||
- id: mypy | ||
name: mypy | ||
entry: scripts/run-in-env.sh mypy | ||
types: [python] | ||
language: script | ||
files: ^(matter_server)/.+\.py$ | ||
|
||
- id: pylint | ||
name: pylint | ||
entry: scripts/run-in-env.sh pylint -j 0 | ||
types: [python] | ||
language: script | ||
files: ^(matter_server)/.+\.py$ | ||
require_serial: true | ||
files: ^(matter_server|pylint)/.+\.py$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,4 +38,3 @@ | |
</head> | ||
<body></body> | ||
</html> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
#!/bin/bash -i | ||
|
||
# Stop on errors | ||
set -e | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.