Skip to content

Commit

Permalink
Makefile/Rakefile add target/task for pre-commit install
Browse files Browse the repository at this point in the history
  • Loading branch information
jbampton committed Feb 10, 2023
1 parent f6a6075 commit 2551b25
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
check:
pre-commit run --all-files

.PHONY: checkinstall
checkinstall:
pre-commit install

.PHONY: checkupdate
checkupdate:
pre-commit autoupdate
5 changes: 5 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ task :check do
sh 'pre-commit run --all-files'
end

desc 'install the pre-commit hooks'
task :checkinstall do
sh 'pre-commit install'
end

desc 'check the pre-commit hooks for updates'
task :checkupdate do
sh 'pre-commit autoupdate'
Expand Down

0 comments on commit 2551b25

Please sign in to comment.