Skip to content

Commit 664bfb2

Browse files
Merge pull request #46 from asottile/pre_commit
Add https://pre-commit.com metadata
2 parents 1ad95bd + 41dadc7 commit 664bfb2

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

.pre-commit-hooks.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
- id: talisman-commit
2+
name: talisman
3+
entry: talisman -githook pre-commit
4+
stages: [commit]
5+
# talisman currently discovers files by itself and does not take them on the cli
6+
pass_filenames: false
7+
types: [text]
8+
language: golang
9+
10+
- id: talisman-push
11+
name: talisman
12+
entry: talisman -githook pre-push
13+
stages: [push]
14+
# talisman currently discovers files by itself and does not take them on the cli
15+
pass_filenames: false
16+
types: [text]
17+
language: golang

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,20 @@ Note that we can ignore files in a few different ways:
8686
is matched against the base name of the file. Thus, the pattern will
8787
match files with that name anywhere in the repository.
8888

89+
#### Usage with the [pre-commit](https://pre-commit.com) git hooks framework
90+
91+
Add this to your `.pre-commit-config.yaml` (be sure to update `rev` to point to
92+
a real git revision!)
93+
94+
```yaml
95+
- repo: https://github.com/thoughtworks/talisman
96+
rev: '' # Update me!
97+
hooks:
98+
# either `commit` or `push` support
99+
- id: talisman-commit
100+
# - id: talisman-push
101+
```
102+
89103
#### Developing locally
90104

91105
To contribute to Talisman, you need a working golang development

0 commit comments

Comments
 (0)