From 3179827b54b2943373db88005d233e4b513c8ffc Mon Sep 17 00:00:00 2001 From: Kevin Carter Date: Mon, 6 Apr 2015 23:54:13 -0500 Subject: [PATCH] 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 --- scripts/gate-check-lint.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/gate-check-lint.sh b/scripts/gate-check-lint.sh index 6aef0bea88..d8c18ae9f9 100755 --- a/scripts/gate-check-lint.sh +++ b/scripts/gate-check-lint.sh @@ -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