Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(82)

Unified Diff: pylint.py

Issue 1426683006: Permits running pylint without pylintrc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pylint.py
diff --git a/pylint.py b/pylint.py
index f24ab1780192805d0fb9d416b251c2220159ff51..168dbec667f2d438768a450305ff5c11098ccf22 100755
--- a/pylint.py
+++ b/pylint.py
@@ -18,7 +18,11 @@ _RC_FILE = os.path.join(_HERE, 'pylintrc')
# Run pylint. We prepend the command-line with the depot_tools rcfile. If
# another rcfile is to be used, passing --rcfile a second time on the command-
# line will work fine.
-command = [sys.executable, _PYLINT, '--rcfile=%s' % _RC_FILE] + sys.argv[1:]
+command = [sys.executable, _PYLINT]
+if os.path.isfile(_RC_FILE):
+ # The file can be removed to test 'normal' pylint behavior.
+ command.append('--rcfile=%s' % _RC_FILE)
+command.extend(sys.argv[1:])
try:
sys.exit(subprocess.call(command))
except KeyboardInterrupt:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698