Skip to main content

Pre commit hook by sbrunner

Project description

Pre commit hooks

pre-commit hook used to...

Check if the copyright is up to date (using the Git history).

Adding to your .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/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
      - id: npm-lock

Copyright configuration

The default values used in the .github/copyright.yaml file.

Default values:

one_date_re: ' Copyright \\(c\\) (?P<year>[0-9]{4})"))'
two_date_re: ' Copyright \\(c\\) (?P<from>[0-9]{4})-(?P<to>[0-9]{4})")'
one_date_format: ' Copyright (c) {year}")'
two_date_format: ' Copyright (c) {from}-{to}")'
license_file: LICENSE

one_date_re: ' Copyright \(c\) (?P<year>[0-9]{4})'
two_date_re: ' Copyright \(c\) (?P<from>[0-9]{4})-(?P<to>[0-9]{4})'
one_date_format: ' Copyright (c) {year}'
two_date_format: ' Copyright (c) {from}-{to}'
license_file: LICENSE

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sbrunner_hooks-1.7.0.tar.gz (9.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sbrunner_hooks-1.7.0-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

Details for the file sbrunner_hooks-1.7.0.tar.gz.

File metadata

  • Download URL: sbrunner_hooks-1.7.0.tar.gz
  • Upload date:
  • Size: 9.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for sbrunner_hooks-1.7.0.tar.gz
Algorithm Hash digest
SHA256 8b85d6ad981dec646b676250beabfba57849be08d73eccf2e6389031319023db
MD5 e0e3106c23c316e468c3c3eddaeacea8
BLAKE2b-256 a9f7c350ee5ec5223731cf249905b70ccf8331fe47c053b8be44a3ae49398933

See more details on using hashes here.

File details

Details for the file sbrunner_hooks-1.7.0-py3-none-any.whl.

File metadata

  • Download URL: sbrunner_hooks-1.7.0-py3-none-any.whl
  • Upload date:
  • Size: 11.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for sbrunner_hooks-1.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5da8f6c9f323fa9d967c14d4a0602544e8222816f6aa06de06471b6fb2410dd3
MD5 5a66fec1237f88bc82979cf96c7d64e0
BLAKE2b-256 e2fc6956c92b3ba1342cfa520df678d397b6260593286a2ad4635297aa7894c0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page