-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
26 lines (21 loc) · 932 Bytes
/
Makefile
File metadata and controls
26 lines (21 loc) · 932 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
.PHONY: install-precommit
install-precommit:
pip install pre-commit
install-hooks:
pre-commit install
pre-commit:
pre-commit run --all-files
create-config:
echo "repos:" > .pre-commit-config.yaml
echo " - repo: https://github.com/pre-commit/pre-commit-hooks" >> .pre-commit-config.yaml
echo " rev: v3.4.0" >> .pre-commit-config.yaml
echo " hooks:" >> .pre-commit-config.yaml
echo " - id: trailing-whitespace" >> .pre-commit-config.yaml
echo " - id: end-of-file-fixer" >> .pre-commit-config.yaml
echo " - id: check-yaml" >> .pre-commit-config.yaml
echo " - id: check-added-large-files" >> .pre-commit-config.yaml
echo " - repo: https://github.com/psf/black" >> .pre-commit-config.yaml
echo " rev: 23.1.0" >> .pre-commit-config.yaml
echo " hooks:" >> .pre-commit-config.yaml
echo " - id: black" >> .pre-commit-config.yaml
setup: install-precommit create-config install-hooks