mirror of
https://github.com/bunkerity/bunkerweb
synced 2026-05-24 09:28:37 +00:00
79 lines
3.4 KiB
YAML
79 lines
3.4 KiB
YAML
# See https://pre-commit.com for more information
|
|
# See https://pre-commit.com/hooks.html for more hooks
|
|
exclude: (^src/ui/client|^LICENSE.md$|^src/VERSION$|^env/|^examples/community/|^src/(bw/misc/root-ca.pem$|deps/src/|common/core/modsecurity/files|ui/static/(js/(editor/|utils/purify/|tsparticles\.bundle\.min\.js)|css/dashboard\.css))|\.(svg|drawio|patch\d?|ascii|tf|tftpl|key)$)
|
|
repos:
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
rev: cef0300fd0fc4d2a87a85fa2093c6b283ea36f4b # frozen: v5.0.0
|
|
hooks:
|
|
- id: requirements-txt-fixer
|
|
name: Fix requirements.txt and requirements.in files
|
|
description: Sorts entries in requirements.txt and requirements.in files.
|
|
files: (requirements|constraints).*\.(txt|in)$
|
|
- id: trailing-whitespace
|
|
- id: end-of-file-fixer
|
|
- id: check-yaml
|
|
exclude: ^(mkdocs.yml|examples/bigbluebutton/docker-compose.yml)$
|
|
args: ["--allow-multiple-documents"]
|
|
- id: check-case-conflict
|
|
|
|
- repo: https://github.com/psf/black
|
|
rev: 1b2427a2b785cc4aac97c19bb4b9a0de063f9547 # frozen: 24.10.0
|
|
hooks:
|
|
- id: black
|
|
name: Black Python Formatter
|
|
language_version: python3.9
|
|
|
|
- repo: https://github.com/pre-commit/mirrors-prettier
|
|
rev: ffb6a759a979008c0e6dff86e39f4745a2d9eac4 # frozen: v3.1.0
|
|
hooks:
|
|
- id: prettier
|
|
name: Prettier Code Formatter
|
|
|
|
- repo: https://github.com/JohnnyMorganz/StyLua
|
|
rev: f4b9d628b48d1a8b21fdc38967831640de1ba09f # frozen: v2.0.1
|
|
hooks:
|
|
- id: stylua-github
|
|
exclude: ^src/(bw/lua/middleclass.lua|common/core/antibot/captcha.lua)$
|
|
|
|
- repo: https://github.com/lunarmodules/luacheck
|
|
rev: cc089e3f65acdd1ef8716cc73a3eca24a6b845e4 # frozen: v1.2.0
|
|
hooks:
|
|
- id: luacheck
|
|
exclude: ^src/(bw/lua/middleclass.lua|common/core/antibot/captcha.lua)$
|
|
args: ["--std", "min", "--codes", "--ranges", "--no-cache"]
|
|
|
|
- repo: https://github.com/pycqa/flake8
|
|
rev: e43806be3607110919eff72939fda031776e885a # frozen: 7.1.1
|
|
hooks:
|
|
- id: flake8
|
|
name: Flake8 Python Linter
|
|
args: ["--max-line-length=160", "--ignore=E266,E402,E501,E722,W503"]
|
|
exclude: ^src/common/db/alembic/(mariadb|mysql|postgresql|sqlite)_versions
|
|
|
|
- repo: https://github.com/dosisod/refurb
|
|
rev: 2e31f0033b6c00bf99912fc6a8b5fd00460c9ba0 # frozen: v2.0.0
|
|
hooks:
|
|
- id: refurb
|
|
name: Refurb Python Refactoring Tool
|
|
exclude: ^tests/
|
|
|
|
- repo: https://github.com/codespell-project/codespell
|
|
rev: 193cd7d27cd571f79358af09a8fb8997e54f8fff # frozen: v2.3.0
|
|
hooks:
|
|
- id: codespell
|
|
name: Codespell Spell Checker
|
|
exclude: (^src/(ui/templates|common/core/.+/files|bw/loading)/.+.html|modsecurity-rules.conf.*|src/ui/app/static/(fonts|libs)/.+)$
|
|
entry: codespell --ignore-regex="(tabEl|Widgits)" --skip CHANGELOG.md,CODE_OF_CONDUCT.md,src/ui/client/build.py,src/ui/app/static/json/countries.geojson,src/ui/app/static/js/pages/bans.js,src/ui/app/static/json/periscop.min.json,src/ui/app/static/json/blockhaus.min.json,src/ui/app/routes/reports.py
|
|
language: python
|
|
types: [text]
|
|
|
|
- repo: https://github.com/gitleaks/gitleaks
|
|
rev: a9e1950fe247fbb08817393121691474c55a6cfa # frozen: v8.21.2
|
|
hooks:
|
|
- id: gitleaks
|
|
|
|
- repo: https://github.com/koalaman/shellcheck-precommit
|
|
rev: 2491238703a5d3415bb2b7ff11388bf775372f29 # frozen: v0.10.0
|
|
hooks:
|
|
- id: shellcheck
|
|
exclude: ^tests/
|