Skip to content

Commit 931d62c

Browse files
committed
Initial commit
0 parents  commit 931d62c

File tree

4 files changed

+25
-0
lines changed

4 files changed

+25
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.idea
2+
.venv

.pre-commit-config.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v5.0.0
4+
hooks:
5+
- id: check-yaml
6+
- id: end-of-file-fixer
7+
- id: trailing-whitespace
8+
- id: check-case-conflict
9+
- id: check-merge-conflict

.pre-commit-hooks.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
- id: python-requirements-version-mandatory
2+
name: Mandatory requirements.txt version specification
3+
description: Fails if a requirement does not specify the version
4+
language: pygrep
5+
files: requirements.*\.txt$
6+
entry: ^(?!.+(?:={2,3}|!=|~=|>=?|<=?)[\S]+).*

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# somehow-useful-pre-commit-hooks
2+
This repository aims to contain pre-commit hooks that are useful for multiple projects.
3+
4+
Feel free to collaborate and submit pull requests!
5+
6+
# Current pre-commit hooks
7+
## python-requirements-version-mandatory
8+
Ensures that requirements listed in a requirements.txt file have a specified version.

0 commit comments

Comments
 (0)