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

Unified Diff: presubmit_canned_checks.py

Issue 1092313003: Enable passing custom pylintrc files to PRESUBMIT.RunPylint. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 5 years, 8 months 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: presubmit_canned_checks.py
diff --git a/presubmit_canned_checks.py b/presubmit_canned_checks.py
index a35cf59f2c8ca73b613a9386575fc43ea05546c5..9179fb6ee35436d654ecae91ed4e02692514d0b3 100644
--- a/presubmit_canned_checks.py
+++ b/presubmit_canned_checks.py
@@ -714,7 +714,7 @@ def _FetchAllFiles(input_api, white_list, black_list):
def GetPylint(input_api, output_api, white_list=None, black_list=None,
- disabled_warnings=None, extra_paths_list=None):
+ disabled_warnings=None, extra_paths_list=None, pylintrc=None):
"""Run pylint on python files.
The default white_list enforces looking only at *.py files.
@@ -749,7 +749,11 @@ def GetPylint(input_api, output_api, white_list=None, black_list=None,
input_api.logging.info('Skipping pylint: no matching changes.')
return []
- extra_args = ['--rcfile=%s' % input_api.os_path.join(_HERE, 'pylintrc')]
+ if pylintrc is not None:
+ pylintrc = input_api.os_path.join(input_api.PresubmitLocalPath(), pylintrc)
+ else:
+ pylintrc = input_api.os_path.join(_HERE, 'pylintrc')
+ extra_args = ['--rcfile=%s' % pylintrc]
if disabled_warnings:
extra_args.extend(['-d', ','.join(disabled_warnings)])
« 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