Skip to content

Commit 6b85867

Browse files
authored
Merge pull request pre-commit#242 from pre-commit/enforce_hooks
Enforce hooks
2 parents 71b041d + ee2499e commit 6b85867

3 files changed

Lines changed: 8 additions & 4 deletions

File tree

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ repos:
3838
language: ruby
3939
additional_dependencies: ['scss_lint:0.57.0']
4040
- id: no-github-dot-git
41-
name: No need for .git for github urls
42-
entry: 'github.*\.git'
41+
name: No need for .git for github/gitlab urls
42+
entry: '(github|gitlab).*\.git'
4343
files: all-repos.yaml
4444
language: pygrep

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
# To build scss continuously I use `watch -n 0.1 make build/main.css`
22

3-
all: install-hooks build/main.css all-hooks.json index.html hooks.html
3+
all: install-hooks check build/main.css all-hooks.json index.html hooks.html
44

55
.PHONY: install-hooks
66
install-hooks: venv
77
venv/bin/pre-commit install
88

9+
.PHONY: check
10+
check: venv
11+
venv/bin/pre-commit run --all-files --show-diff-on-failure
12+
913
build/main.css: venv node_modules build scss/main.scss scss/_variables.scss
1014
venv/bin/pysassc -s compressed scss/main.scss build/main.css
1115

index.mako

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -871,7 +871,7 @@ time and stashing the unstaged changes while running hooks.
871871
872872
## pre-commit during merges
873873
874-
The biggest gripe we’ve had in the past with pre-commit hooks was during merge
874+
The biggest gripe we’ve had in the past with pre-commit hooks was during merge
875875
conflict resolution. When working on very large projects a merge often
876876
results in hundreds of committed files. I shouldn’t need to run hooks on all
877877
of these files that I didn’t even touch! This often led to running commit

0 commit comments

Comments
 (0)