Add pre-commit.

Esse commit está contido em:
William Ting
2016-06-01 14:13:51 -07:00
commit 731ff72358
5 arquivos alterados com 61 adições e 0 exclusões
+1
Ver Arquivo
@@ -1 +1,2 @@
tab*
.tox
+3
Ver Arquivo
@@ -0,0 +1,3 @@
{
"esversion": 6
}
+35
Ver Arquivo
@@ -0,0 +1,35 @@
- repo: git://github.com/pre-commit/pre-commit-hooks.git
sha: 6b1aa19425b35f8c34f43ada8f1045b028dc19a5
hooks:
- id: autopep8-wrapper
args:
- --in-place
- --aggressive
- --aggressive
- --max-line-length=131
- id: check-ast
- id: check-case-conflict
- id: check-docstring-first
- id: check-json
files: \.(jshintrc|json)$
- id: debug-statements
- id: double-quote-string-fixer
- id: end-of-file-fixer
- id: fix-encoding-pragma
- id: flake8
args:
- --max-line-length=131
- --ignore=E126,E128,E731
- id: pretty-format-json
args:
- --autofix
- --indent
- '4'
- id: requirements-txt-fixer
- id: trailing-whitespace
- repo: git://github.com/pre-commit/mirrors-jshint
sha: 431358a85a3084cb86d731f2cd46490ec04f5c69
hooks:
- id: jshint
args:
- --config=.jshintrc
+13
Ver Arquivo
@@ -0,0 +1,13 @@
.PHONY: pre-commit clean test
pre-commit:
@tox -e pre-commit -- install -f --install-hooks
test: pre-commit
@tox -e pre-commit -- run --all-files
@tox
clean:
@rm -fr .tox
@find . -name '*.py[co]' -delete
@find . -name '__pycache__' -delete
+9
Ver Arquivo
@@ -0,0 +1,9 @@
[tox]
envlist = py27,py35
skipsdist = true
[testenv:pre-commit]
deps =
pre-commit
commands =
pre-commit {posargs}