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.0.0.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

sbrunner_hooks-1.0.0-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sbrunner_hooks-1.0.0.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for sbrunner_hooks-1.0.0.tar.gz
Algorithm Hash digest
SHA256 9cc7113c48d59e8ea99e44851e854688b2fdb95d97ca6f3c86d8502fff5a31d0
MD5 a650f4d8d90ac364a70751ff592ca80e
BLAKE2b-256 e90296996fe752a8da7c83369a41fdd2dcbeb19396d51b4c4e7645673b81e948

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for sbrunner_hooks-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2a7b81106caa48e0b5824fec758b7521e24e12022beae911a4af3e8a12808502
MD5 ab298738beb795f4af2ed0bde4d7e906
BLAKE2b-256 3b8f9be58afc5645844fc97d0a9c43832a5b78f1a3a0a9d55887ff4e22cb3640

See more details on using hashes here.

Provenance

Supported by

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