PRESUBMIT: Improve PyLint check and add GN format check.
Add pylintrc file based on
https://code.google.com/p/chromium/codesearch#chromium/src/tools/perf/pylintrc
bit tightened up quite a bit (the one in depot_tools is far
more relaxed).
Remove a few excluded directories from pylint check and fixed/
suppressed all warnings generated.
Add GN format check + formatted all GN files using 'gn format'.
Cleanup redundant rules in tools/PRESUBMIT.py
TESTED=Ran 'git cl presubmit -vv', fixed the PyLint violations.
Ran it again with a modification in webrtc/build/webrtc.gni, formatted
all the GN files and ran it again.
R=henrika@webrtc.org, phoglund@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/50069004
Cr-Commit-Position: refs/heads/master@{#9274}
diff --git a/setup_links.py b/setup_links.py
index 2060110..992c03e 100755
--- a/setup_links.py
+++ b/setup_links.py
@@ -171,7 +171,7 @@
else:
log('Removing %s: %s', filesystem_type, self._path)
- def doit(self, _links_db):
+ def doit(self, _):
os.remove(self._path)
@@ -187,7 +187,7 @@
else:
logging.warn('Removing directory: %s', self._path)
- def doit(self, _links_db):
+ def doit(self, _):
if sys.platform.startswith('win'):
# shutil.rmtree() doesn't work on Windows if any of the directories are
# read-only, which svn repositories are.
@@ -202,7 +202,7 @@
self._priority = 1
self._path = path
- def doit(self, _links_db):
+ def doit(self, _):
try:
os.makedirs(self._path)
except OSError as e:
@@ -258,7 +258,7 @@
os.symlink = symlink
-class WebRTCLinkSetup():
+class WebRTCLinkSetup(object):
def __init__(self, links_db, force=False, dry_run=False, prompt=False):
self._force = force
self._dry_run = dry_run
@@ -482,7 +482,7 @@
logging.error('On Windows, you now need to have administrator '
'privileges for the shell running %s (or '
'`gclient sync|runhooks`).\nPlease start another command '
- 'prompt as Administrator and try again.' % sys.argv[0])
+ 'prompt as Administrator and try again.', sys.argv[0])
return 1
if not os.path.exists(CHROMIUM_CHECKOUT):