1 Star 0 Fork 0

xlinglongx/j2lint

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
.pre-commit-config.yaml 2.34 KB
一键复制 编辑 原始数据 按行查看 历史
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
files: ^(j2lint|tests)/
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
#exclude_types: [jinja, text]
- id: check-added-large-files
- id: check-merge-conflict
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.5
hooks:
- name: Check and insert license on Python files
id: insert-license
files: .*\.py$
args:
- --license-filepath
- .github/license-short.txt
- --use-current-year
- --allow-past-years
- --fuzzy-match-generates-todo
- --no-extra-eol
- name: Check and insert license on Jinja2 files
id: insert-license
files: .*\.j2$
args:
- --license-filepath
- .github/license-short.txt
- --use-current-year
- --allow-past-years
- --fuzzy-match-generates-todo
- --comment-style
- '{#||#}'
- --no-extra-eol
- repo: https://github.com/pycqa/flake8
rev: 7.1.0
hooks:
- id: flake8
name: Check for PEP8 error on Python files
args:
- --config=/dev/null
- --max-line-length=160
types: [python]
- repo: https://github.com/pycqa/pylint
rev: v3.2.5
hooks:
- id: pylint # Use pylintrc file in repository
name: Check for Linting error on Python files
description: This hook runs pylint.
types: [python]
args:
# Suppress duplicate code for modules header
- -d duplicate-code
additional_dependencies:
- jinja2
- rich
exclude: ^tests/
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
name: Check for changes when running isort on all python files
- repo: https://github.com/psf/black
rev: 24.4.2
hooks:
- id: black
name: Check for changes when running Black on all python files
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.10.1
hooks:
- id: mypy
args:
- --config-file=pyproject.toml
# additional_dependencies:
# Do not run on test
files: ^(j2lint)/
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/linglong/j2lint.git
git@gitee.com:linglong/j2lint.git
linglong
j2lint
j2lint
devel

搜索帮助