From 4af610eb7de77921008c57e0a4b39ec537c7acbb Mon Sep 17 00:00:00 2001 From: Eli White Date: Thu, 11 Aug 2016 03:07:36 -0700 Subject: [PATCH 1/5] Trying to set up appveyor --- appveyor.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 appveyor.yml diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 0000000000..c1e6ef6ec9 --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,13 @@ +build: false + +environment: + matrix: + - PYTHON_VERSION: 2.7 + +install: + - pip install -r requirements.txt + - pip install pylint + +test_script: + - python pylint-recursive.py + - python -m unittest discover -v -p "*_test.py" From 2acbcbe08377f634550116684f82230341660b08 Mon Sep 17 00:00:00 2001 From: Eli White Date: Thu, 11 Aug 2016 03:12:06 -0700 Subject: [PATCH 2/5] Set the path too --- appveyor.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index c1e6ef6ec9..9c693d4a6b 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,8 +1,13 @@ build: false environment: - matrix: - - PYTHON_VERSION: 2.7 + - PYTHON: "C:\\Python27" + PYTHON_VERSION: "2.7.x" # currently 2.7.9 + PYTHON_ARCH: "32" + + - PYTHON: "C:\\Python27-x64" + PYTHON_VERSION: "2.7.x" # currently 2.7.9 + PYTHON_ARCH: "64" install: - pip install -r requirements.txt From a5e83a386824d0667c22508736850335748795ef Mon Sep 17 00:00:00 2001 From: Eli White Date: Thu, 11 Aug 2016 03:13:17 -0700 Subject: [PATCH 3/5] Typo --- appveyor.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 9c693d4a6b..0d990973ae 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,13 +1,14 @@ build: false environment: - - PYTHON: "C:\\Python27" - PYTHON_VERSION: "2.7.x" # currently 2.7.9 - PYTHON_ARCH: "32" + matrix: + - PYTHON: "C:\\Python27" + PYTHON_VERSION: "2.7.x" # currently 2.7.9 + PYTHON_ARCH: "32" - - PYTHON: "C:\\Python27-x64" - PYTHON_VERSION: "2.7.x" # currently 2.7.9 - PYTHON_ARCH: "64" + - PYTHON: "C:\\Python27-x64" + PYTHON_VERSION: "2.7.x" # currently 2.7.9 + PYTHON_ARCH: "64" install: - pip install -r requirements.txt From 344eea57c64c3e7dddc3a6e2120e514ef0151650 Mon Sep 17 00:00:00 2001 From: Eli White Date: Thu, 11 Aug 2016 03:15:47 -0700 Subject: [PATCH 4/5] Referencing the path when installing --- appveyor.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 0d990973ae..d8de971f99 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -11,8 +11,8 @@ environment: PYTHON_ARCH: "64" install: - - pip install -r requirements.txt - - pip install pylint + - "%PYTHON%\\python.exe -m pip install -r requirements.txt" + - "%PYTHON%\\python.exe -m pip install pylint" test_script: - python pylint-recursive.py From 434faa2d7a09f7cdbb2d4098ad8c48769e7789a9 Mon Sep 17 00:00:00 2001 From: Eli White Date: Thu, 11 Aug 2016 03:20:08 -0700 Subject: [PATCH 5/5] Using os.sep --- pylint-recursive.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pylint-recursive.py b/pylint-recursive.py index 82c4664e97..638cc7b842 100644 --- a/pylint-recursive.py +++ b/pylint-recursive.py @@ -2,7 +2,7 @@ ''' Author: gregorynicholas (github), modified by Jacob Henderson (jacohend, github) Module that runs pylint on all python scripts found in a directory tree.. -''' +''' import os #import re @@ -19,7 +19,7 @@ def check(module): ''' apply pylint to the file specified if it is a *.py file ''' - module_name = module.rsplit('/', 1)[1] + module_name = module.rsplit(os.sep, 1)[1] if module[-3:] == ".py" and module_name not in IGNORED_FILES: print "CHECKING ", module pout = os.popen('pylint %s'% module, 'r') @@ -34,10 +34,10 @@ def check(module): errors.append("FILE: " + module) errors.append("FAILED pylint inspection: " + line) return False - + if __name__ == "__main__": try: - print sys.argv + print sys.argv BASE_DIRECTORY = sys.argv[1] except IndexError: print "no directory specified, defaulting to current working directory"