Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added IGNORED_FILES list to pylint-recursive.py #923

Merged
merged 4 commits into from
Jul 26, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pokecli.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def init_config():
for key in config.__dict__:
if key in load:
config.__dict__[key] = load[key]

if 'catch' in load:
config.catch = load['catch']

Expand Down
13 changes: 8 additions & 5 deletions pylint-recursive.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,22 @@
'''

import os
import re
#import re
import sys

passed = 0
failed = 0
errors = list()

IGNORED_FILES = ["lcd.py"]

def check(module):
global passed, failed
'''
apply pylint to the file specified if it is a *.py file
'''
if module[-3:] == ".py":
module_name = module.rsplit('/', 1)[1]
if module[-3:] == ".py" and module_name not in IGNORED_FILES:
print "CHECKING ", module
pout = os.popen('pylint %s'% module, 'r')
for line in pout:
Expand All @@ -40,13 +42,14 @@ def check(module):
except IndexError:
print "no directory specified, defaulting to current working directory"
BASE_DIRECTORY = os.getcwd()


print "looking for *.py scripts in subdirectories of ", BASE_DIRECTORY
print "looking for *.py scripts in subdirectories of ", BASE_DIRECTORY

for root, dirs, files in os.walk(BASE_DIRECTORY):
for name in files:
filepath = os.path.join(root, name)
check(filepath)

print "Passed: " + str(passed) + " Failed: " + str(failed)
print "\n"
print "Showing errors:"
Expand Down