Adds Flake8 job to the lint check

This update uses the lint check script to add a hacking/flake8
job which will ensure that all python files are passing what is
required by OpenStack.

Change-Id: If8312de8ca6822b7aa562775727c91a34987f845
Partial-Bug: 1440462
This commit is contained in:
Kevin Carter
2015-04-06 23:54:13 -05:00
committed by Jesse Pretorius
parent 4c4fbe25c3
commit 3179827b54

View File

@@ -32,6 +32,13 @@ else
pip2 install ansible-lint || pip install ansible-lint
fi
# Run hacking/flake8 check for all python files
# Ignores the following rules due to how ansible modules work in general
# F403 'from ansible.module_utils.basic import *' used; unable to detect undefined names
# H303 No wildcard (*) import.
flake8 --ignore=F403,H303 $(grep -rln -e '^#!/usr/bin/env python' -e '^#!/bin/python' * )
# Create keys if they don't already exist.
ssh_key_create