Skip to content

Commit 2551b25

Browse files
committed
Makefile/Rakefile add target/task for pre-commit install
1 parent f6a6075 commit 2551b25

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

Makefile

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
check:
33
pre-commit run --all-files
44

5+
.PHONY: checkinstall
6+
checkinstall:
7+
pre-commit install
8+
59
.PHONY: checkupdate
610
checkupdate:
711
pre-commit autoupdate

Rakefile

+5
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ task :check do
33
sh 'pre-commit run --all-files'
44
end
55

6+
desc 'install the pre-commit hooks'
7+
task :checkinstall do
8+
sh 'pre-commit install'
9+
end
10+
611
desc 'check the pre-commit hooks for updates'
712
task :checkupdate do
813
sh 'pre-commit autoupdate'

0 commit comments

Comments
 (0)