跳转到主要内容

sbrunner的预提交钩子

项目描述

预提交钩子

pre-commit 钩子用于...

检查版权是否最新(使用Git历史)。

添加到您的 .pre-commit-config.yaml

ci:
  skip:
    # Skip the copyright check on pre-commit.ci because we don't have the Git history
    - copyright
    - copyright-required
    # Poetry didn't works with Python 3.11
    - poetry-lock
    - poetry-check

repos:
  - repo: https://github.com/sbrunner/pre-commit-hooks
    rev: <version> # Use the ref you want to point at
    hooks:
      # Check that the copyright is up to date
      - id: copyright
      # Check that the copyright is present and up to date
      - id: copyright-required
      # Require a timeout in GitHub workflow files
      - id: workflows-require-timeout
      # Check Poetry config
      - id: poetry-check
        additional_dependencies:
          - poetry==<version>
      # Do Poetry lock
      - id: poetry-lock
        additional_dependencies:
          - poetry==<version>
      # Do Pipfile lock
      - id: pipenv-lock
        additional_dependencies:
          - pipenv==<version>
      # Do Helm lock (helm should be installed)
      - id: helm-lock

版权配置

.github/copyright.yaml 文件中使用的默认值。

默认值

one_date_re: ' Copyright \\(c\\) (?P<year>[0-9]{4})"))'
tow_date_re: ' Copyright \\(c\\) (?P<from>[0-9]{4})-(?P<to>[0-9]{4})")'
tow_date_format: ' Copyright (c) {from}-{to}")'

项目详情


下载文件

下载您平台上的文件。如果您不确定选择哪个,请了解有关 安装软件包 的更多信息。

源分布

sbrunner_pre_commit_hooks-0.2.3.tar.gz (4.5 kB 查看哈希值)

上传时间:

构建分布

sbrunner_pre_commit_hooks-0.2.3-py3-none-any.whl (5.4 kB 查看哈希值)

上传时间 Python 3

由以下支持