brintos

brintos / llvm-project-archived public Read only

0
0
Text · 673 B · 18e6e67 Raw
25 lines · python
1#!/usr/bin/env python2#3# Checks files to make sure they conform to LLVM standards which can be applied4# to any programming language: at present, line length and trailing whitespace.5 6import common_lint7import sys8 9 10class GenericCodeLint(common_lint.BaseLint):11    MAX_LINE_LENGTH = 8012 13    def RunOnFile(self, filename, lines):14        common_lint.VerifyLineLength(filename, lines, GenericCodeLint.MAX_LINE_LENGTH)15        common_lint.VerifyTrailingWhitespace(filename, lines)16 17 18def GenericCodeLintMain(filenames):19    common_lint.RunLintOverAllFiles(GenericCodeLint(), filenames)20    return 021 22 23if __name__ == "__main__":24    sys.exit(GenericCodeLintMain(sys.argv[1:]))25