comparison utils/lint/generic_lint.py @ 0:95c75e76d11b LLVM3.4

LLVM 3.4
author Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
date Thu, 12 Dec 2013 13:56:28 +0900 (2013-12-12)
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:95c75e76d11b
1 #!/usr/bin/python
2 #
3 # Checks files to make sure they conform to LLVM standards which can be applied
4 # to any programming language: at present, line length and trailing whitespace.
5
6 import common_lint
7 import sys
8
9 class GenericCodeLint(common_lint.BaseLint):
10 MAX_LINE_LENGTH = 80
11
12 def RunOnFile(self, filename, lines):
13 common_lint.VerifyLineLength(filename, lines,
14 GenericCodeLint.MAX_LINE_LENGTH)
15 common_lint.VerifyTrailingWhitespace(filename, lines)
16
17
18 def GenericCodeLintMain(filenames):
19 common_lint.RunLintOverAllFiles(GenericCodeLint(), filenames)
20 return 0
21
22
23 if __name__ == '__main__':
24 sys.exit(GenericCodeLintMain(sys.argv[1:]))