Skip to content

Commit

Permalink
resolve path for require-ascii hook
Browse files Browse the repository at this point in the history
Apparently it gets installed.
  • Loading branch information
jumanjiman committed Aug 19, 2018
1 parent 1f52f00 commit 7318d22
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-hooks.yaml
Expand Up @@ -53,7 +53,7 @@
- id: require-ascii
name: Check file encoding
description: Ensure file is ascii-encoded
entry: pre_commit_hooks/require-ascii.py
entry: require-ascii.py
language: python
types: [text]
additional_dependencies: [chardet]
Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -28,7 +28,7 @@ Git hooks to integrate with [pre-commit](http://pre-commit.com).
Add to `.pre-commit-config.yaml` in your git repo:

- repo: https://github.com/jumanjihouse/pre-commit-hooks
sha: 1.9.1
sha: 1.9.2
hooks:
- id: check-mailmap
- id: fasterer
Expand Down
2 changes: 1 addition & 1 deletion ci/test
Expand Up @@ -27,7 +27,7 @@ main() {
while IFS= read -r line; do
files=("${files[@]}" "${line}")
done < <(git ls-files | grep -vE '^ci/ansi$')
run pre-commit try-repo ./ require-ascii --verbose --files "${files[@]}"
run pre-commit try-repo "$(pwd)" require-ascii --verbose --files "${files[@]}"
}

run_precommit() {
Expand Down
Empty file added pre_commit_hooks/__init__.py
Empty file.
8 changes: 8 additions & 0 deletions setup.py
Expand Up @@ -6,7 +6,15 @@
url='https://github.com/jumanjihouse/pre-commit-hooks',
version='0.0.0',

packages=[
'pre_commit_hooks',
],

install_requires=[
'chardet',
],

scripts=[
'pre_commit_hooks/require-ascii.py',
],
)

0 comments on commit 7318d22

Please sign in to comment.