Skip to content

Commit 4af70c5

Browse files
committed
added .pre-commit-config.yaml
1 parent 23542d7 commit 4af70c5

File tree

1 file changed

+72
-0
lines changed

1 file changed

+72
-0
lines changed

.pre-commit-config.yaml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
#
2+
# Author: Hari Sekhon
3+
# Date: 2024-08-08 17:34:56 +0300 (Thu, 08 Aug 2024)
4+
#
5+
# vim:ts=2:sts=2:sw=2:et
6+
#
7+
# https///github.com/HariSekhon/Templates
8+
#
9+
# License: see accompanying Hari Sekhon LICENSE file
10+
#
11+
# If you're using my code you're welcome to connect with me on LinkedIn and optionally send me feedback to help steer this or other code I publish
12+
#
13+
# https://www.linkedin.com/in/HariSekhon
14+
#
15+
16+
# ============================================================================ #
17+
# P r e - C o m m i t
18+
# ============================================================================ #
19+
20+
---
21+
fail_fast: false
22+
#exclude: *.tmp$
23+
24+
repos:
25+
26+
# will accept anything that 'git clone' understands
27+
# this means you can set this to a local git repo to develop your own hook repos interactively
28+
- repo: https://github.com/pre-commit/pre-commit-hooks
29+
rev: v4.6.0
30+
hooks:
31+
- id: check-yaml
32+
# Common errors
33+
- id: end-of-file-fixer
34+
- id: trailing-whitespace
35+
args: [--markdown-linebreak-ext=md]
36+
# Git style
37+
- id: check-added-large-files
38+
- id: check-merge-conflict
39+
- id: check-vcs-permalinks
40+
- id: forbid-new-submodules
41+
# Cross platform
42+
- id: check-case-conflict
43+
- id: mixed-line-ending
44+
args: [--fix=lf]
45+
# Security
46+
- id: detect-aws-credentials
47+
args: ['--allow-missing-credentials']
48+
49+
- repo: https://github.com/psf/black
50+
rev: 24.8.0
51+
hooks:
52+
- id: black
53+
54+
# Git secrets Leaks
55+
- repo: https://github.com/awslabs/git-secrets.git
56+
# the release tags for 1.2.0, 1.2.1 and 1.3.0 are broken with this error:
57+
#
58+
# /Users/hari/.cache/pre-commit/repo......./.pre-commit-hooks.yaml is not a file
59+
#
60+
rev: 5357e18
61+
hooks:
62+
- id: git-secrets
63+
64+
- repo: https://github.com/markdownlint/markdownlint
65+
rev: v0.12.0
66+
hooks:
67+
- id: markdownlint
68+
name: Markdownlint
69+
description: Run markdownlint on your Markdown files
70+
entry: mdl
71+
language: ruby
72+
files: \.(md|mdown|markdown)$

0 commit comments

Comments
 (0)