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

Side by Side Diff: tools/presubmit.py

Issue 2601043002: Re-enables the readability/fn_size presubmit. (Closed)
Patch Set: Created 3 years, 11 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # 2 #
3 # Copyright 2012 the V8 project authors. All rights reserved. 3 # Copyright 2012 the V8 project authors. All rights reserved.
4 # Redistribution and use in source and binary forms, with or without 4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions are 5 # modification, are permitted provided that the following conditions are
6 # met: 6 # met:
7 # 7 #
8 # * Redistributions of source code must retain the above copyright 8 # * Redistributions of source code must retain the above copyright
9 # notice, this list of conditions and the following disclaimer. 9 # notice, this list of conditions and the following disclaimer.
10 # * Redistributions in binary form must reproduce the above 10 # * Redistributions in binary form must reproduce the above
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 48
49 from testrunner.local import statusfile 49 from testrunner.local import statusfile
50 from testrunner.local import testsuite 50 from testrunner.local import testsuite
51 from testrunner.local import utils 51 from testrunner.local import utils
52 52
53 # Special LINT rules diverging from default and reason. 53 # Special LINT rules diverging from default and reason.
54 # build/header_guard: Our guards have the form "V8_FOO_H_", not "SRC_FOO_H_". 54 # build/header_guard: Our guards have the form "V8_FOO_H_", not "SRC_FOO_H_".
55 # build/include_what_you_use: Started giving false positives for variables 55 # build/include_what_you_use: Started giving false positives for variables
56 # named "string" and "map" assuming that you needed to include STL headers. 56 # named "string" and "map" assuming that you needed to include STL headers.
57 # TODO(bmeurer): Fix and re-enable readability/check 57 # TODO(bmeurer): Fix and re-enable readability/check
58 # TODO(epertoso): Maybe re-enable readability/fn_size after
59 # http://crrev.com/2199323003 relands. 58 # http://crrev.com/2199323003 relands.
60 59
61 LINT_RULES = """ 60 LINT_RULES = """
62 -build/header_guard 61 -build/header_guard
63 -build/include_what_you_use 62 -build/include_what_you_use
64 -build/namespaces 63 -build/namespaces
65 -readability/check 64 -readability/check
66 -readability/fn_size
67 +readability/streams 65 +readability/streams
68 -runtime/references 66 -runtime/references
69 """.split() 67 """.split()
70 68
71 LINT_OUTPUT_PATTERN = re.compile(r'^.+[:(]\d+[:)]|^Done processing') 69 LINT_OUTPUT_PATTERN = re.compile(r'^.+[:(]\d+[:)]|^Done processing')
72 FLAGS_LINE = re.compile("//\s*Flags:.*--([A-z0-9-])+_[A-z0-9].*\n") 70 FLAGS_LINE = re.compile("//\s*Flags:.*--([A-z0-9-])+_[A-z0-9].*\n")
73 71
74 TOOLS_PATH = dirname(abspath(__file__)) 72 TOOLS_PATH = dirname(abspath(__file__))
75 73
76 def CppLintWorker(command): 74 def CppLintWorker(command):
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 print "Running status-files check..." 499 print "Running status-files check..."
502 success &= StatusFilesProcessor().RunOnPath(workspace) 500 success &= StatusFilesProcessor().RunOnPath(workspace)
503 if success: 501 if success:
504 return 0 502 return 0
505 else: 503 else:
506 return 1 504 return 1
507 505
508 506
509 if __name__ == '__main__': 507 if __name__ == '__main__':
510 sys.exit(Main()) 508 sys.exit(Main())
OLDNEW
« 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