From 8ecfa3d1d698aea0fe96c206a2be2f64a2cc136b Mon Sep 17 00:00:00 2001 From: Danny Hermes Date: Tue, 21 Jul 2015 08:48:14 -0700 Subject: [PATCH] Making tox lint target ignore files outside the git repo. --- scripts/pep8_on_repo.sh | 19 +++++++++++++++++++ tox.ini | 4 ++-- 2 files changed, 21 insertions(+), 2 deletions(-) create mode 100755 scripts/pep8_on_repo.sh diff --git a/scripts/pep8_on_repo.sh b/scripts/pep8_on_repo.sh new file mode 100755 index 000000000000..6afcd7f75370 --- /dev/null +++ b/scripts/pep8_on_repo.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +# Copyright 2015 Google Inc. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -ev + +pep8 $(git ls-files '*py') diff --git a/tox.ini b/tox.ini index 15d245fb0154..daca1ffae297 100644 --- a/tox.ini +++ b/tox.ini @@ -43,14 +43,14 @@ deps = passenv = {[testenv:system-tests]passenv} SPHINX_RELEASE [pep8] -exclude = gcloud/datastore/_datastore_v1_pb2.py,docs/conf.py,*.egg/,.*/ +exclude = gcloud/datastore/_datastore_v1_pb2.py,docs/conf.py verbose = 1 [testenv:lint] basepython = python2.7 commands = - pep8 + {toxinidir}/scripts/pep8_on_repo.sh python run_pylint.py deps = pep8