diff options
author | Chris Meyers <chris.meyers.fsu@gmail.com> | 2015-11-06 13:38:29 +0100 |
---|---|---|
committer | Chris Meyers <chris.meyers.fsu@gmail.com> | 2015-11-06 13:38:29 +0100 |
commit | 0b4efa3fcdae95423cf980076f1910b4bf61daf8 (patch) | |
tree | d2a3a345e478b52c08666c26763db8ca3ce85a58 | |
parent | null pointer exception (diff) | |
download | awx-0b4efa3fcdae95423cf980076f1910b4bf61daf8.tar.xz awx-0b4efa3fcdae95423cf980076f1910b4bf61daf8.zip |
added git pre commit hook to run flake8
-rwxr-xr-x | setup.cfg | 2 | ||||
-rwxr-xr-x | tools/git_hooks/pre-commit | 2 | ||||
-rw-r--r-- | tools/git_hooks/pre_commit.yml | 8 |
3 files changed, 11 insertions, 1 deletions
@@ -18,4 +18,4 @@ exclude=.tox,awx/lib/site-packages,awx/plugins/inventory/ec2.py,awx/plugins/inve [flake8] ignore=E201,E203,E221,E225,E231,E241,E251,E261,E265,E302,E303,E501,W291,W391,W293,E731 -exclude=.tox,awx/lib/site-packages,awx/plugins/inventory/ec2.py,awx/plugins/inventory/gce.py,awx/plugins/inventory/vmware.py,awx/plugins/inventory/windows_azure.py,awx/plugins/inventory/openstack.py,awx/plugins/inventory/rax.py,awx/ui,awx/api/urls.py,awx/main/migrations,awx/main/tests/data,node_modules/,awx/projects/,tools/docker +exclude=.tox,awx/lib/site-packages,awx/plugins/inventory/ec2.py,awx/plugins/inventory/gce.py,awx/plugins/inventory/vmware.py,awx/plugins/inventory/windows_azure.py,awx/plugins/inventory/openstack.py,awx/plugins/inventory/rax.py,awx/ui,awx/api/urls.py,awx/main/migrations,awx/main/tests/data,node_modules/,awx/projects/,tools/docker,awx/settings/local_settings.py diff --git a/tools/git_hooks/pre-commit b/tools/git_hooks/pre-commit new file mode 100755 index 0000000000..a4f4045b4d --- /dev/null +++ b/tools/git_hooks/pre-commit @@ -0,0 +1,2 @@ +#!/bin/bash +ansible-playbook -i "127.0.0.1," tools/git_hooks/pre_commit.yml diff --git a/tools/git_hooks/pre_commit.yml b/tools/git_hooks/pre_commit.yml new file mode 100644 index 0000000000..d2432bbd82 --- /dev/null +++ b/tools/git_hooks/pre_commit.yml @@ -0,0 +1,8 @@ +- hosts: all + connection: local + gather_facts: false + tasks: + - name: lint check w/ flake8 + command: 'flake8 {{ playbook_dir }}/../../' + register: result + |