Lines Matching refs:filename

360 def ParseNolintSuppressions(filename, raw_line, linenum, error):  argument
385 error(filename, linenum, 'readability/nolint', 5,
700 def Check(self, error, filename, linenum): argument
723 error(filename, linenum, 'readability/fn_size', error_level,
746 def __init__(self, filename): argument
747 self._filename = filename
859 def Error(filename, linenum, category, confidence, message): argument
885 filename, linenum, message, category, confidence))
888 filename, linenum, message, category, confidence))
891 filename, linenum, message, category, confidence))
961 def RemoveMultiLineComments(filename, lines, error): argument
970 error(filename, lineix_begin + 1, 'readability/multiline_comment', 5,
1105 def CheckForCopyright(filename, lines, error): argument
1113 error(filename, 0, 'legal/copyright', 5,
1118 def GetHeaderGuardCPPVariable(filename): argument
1132 filename = re.sub(r'_flymake\.h$', '.h', filename)
1133 filename = re.sub(r'/\.flymake/([^/]*)$', r'/\1', filename)
1135 fileinfo = FileInfo(filename)
1142 def CheckForHeaderGuard(filename, lines, error): argument
1154 cppvar = GetHeaderGuardCPPVariable(filename)
1177 error(filename, 0, 'build/header_guard', 5,
1183 error(filename, 0, 'build/header_guard', 5,
1195 ParseNolintSuppressions(filename, lines[ifndef_linenum], ifndef_linenum,
1197 error(filename, ifndef_linenum, 'build/header_guard', error_level,
1201 error(filename, 0, 'build/header_guard', 5,
1211 ParseNolintSuppressions(filename, lines[endif_linenum], endif_linenum,
1213 error(filename, endif_linenum, 'build/header_guard', error_level,
1217 def CheckForUnicodeReplacementCharacters(filename, lines, error): argument
1232 error(filename, linenum, 'readability/utf8', 5,
1236 def CheckForNewlineAtEOF(filename, lines, error): argument
1250 error(filename, len(lines) - 2, 'whitespace/ending_newline', 5,
1254 def CheckForMultilineCommentsAndStrings(filename, clean_lines, linenum, error): argument
1278 error(filename, linenum, 'readability/multiline_comment', 5,
1286 error(filename, linenum, 'readability/multiline_string', 5,
1309 def CheckPosixThreading(filename, clean_lines, linenum, error): argument
1330 error(filename, linenum, 'runtime/threadsafe_fn', 2,
1342 def CheckInvalidIncrement(filename, clean_lines, linenum, error): argument
1360 error(filename, linenum, 'runtime/invalid_increment', 5,
1372 def CheckBegin(self, filename, clean_lines, linenum, error): argument
1387 def CheckEnd(self, filename, clean_lines, linenum, error): argument
1428 def CheckBegin(self, filename, clean_lines, linenum, error): argument
1442 def CheckEnd(self, filename, clean_lines, linenum, error): argument
1478 error(filename, linenum, 'readability/namespace', 5,
1484 error(filename, linenum, 'readability/namespace', 5,
1591 def Update(self, filename, clean_lines, linenum, error): argument
1683 self.stack[-1].CheckBegin(filename, clean_lines, linenum, error)
1723 self.stack[-1].CheckEnd(filename, clean_lines, linenum, error)
1739 def CheckClassFinished(self, filename, error): argument
1752 error(filename, obj.starting_linenum, 'build/class', 5,
1757 def CheckForNonStandardConstructs(filename, clean_lines, linenum, argument
1790 error(filename, linenum, 'runtime/printf_format', 3,
1794 error(filename, linenum, 'runtime/printf_format', 2,
1801 error(filename, linenum, 'build/printf_format', 3,
1812 error(filename, linenum, 'build/storage_class', 5,
1816 error(filename, linenum, 'build/endif_comment', 5,
1820 error(filename, linenum, 'build/forward_decl', 5,
1825 error(filename, linenum, 'build/deprecated', 3,
1836 error(filename, linenum, 'runtime/member_string_references', 2,
1860 error(filename, linenum, 'runtime/explicit', 5,
1864 def CheckSpacingForFunctionCall(filename, line, linenum, error): argument
1911 error(filename, linenum, 'whitespace/parens', 4,
1914 error(filename, linenum, 'whitespace/parens', 2,
1919 error(filename, linenum, 'whitespace/parens', 4,
1927 error(filename, linenum, 'whitespace/parens', 2,
1930 error(filename, linenum, 'whitespace/parens', 2,
1949 def CheckForFunctionLengths(filename, clean_lines, linenum, argument
2010 error(filename, linenum, 'readability/fn_size', 5,
2013 function_state.Check(error, filename, linenum)
2022 def CheckComment(comment, filename, linenum, error): argument
2036 error(filename, linenum, 'whitespace/todo', 2,
2041 error(filename, linenum, 'readability/todo', 2,
2048 error(filename, linenum, 'whitespace/todo', 2,
2051 def CheckAccess(filename, clean_lines, linenum, nesting_state, error): argument
2071 error(filename, linenum, 'readability/constructors', 3,
2209 def CheckSpacing(filename, clean_lines, linenum, nesting_state, error): argument
2280 error(filename, linenum, 'whitespace/blank_line', 2,
2295 error(filename, linenum, 'whitespace/blank_line', 3,
2300 error(filename, linenum, 'whitespace/blank_line', 3,
2316 error(filename, linenum, 'whitespace/comments', 2,
2332 error(filename, linenum, 'whitespace/comments', 4,
2334 CheckComment(line[commentpos:], filename, linenum, error)
2346 error(filename, linenum, 'whitespace/operators', 4,
2359 error(filename, linenum, 'whitespace/operators', 3,
2365 error(filename, linenum, 'whitespace/operators', 3,
2378 error(filename, linenum, 'whitespace/operators', 3,
2388 error(filename, linenum, 'whitespace/operators', 3,
2405 error(filename, linenum, 'whitespace/operators', 3,
2411 error(filename, linenum, 'whitespace/operators', 4,
2417 error(filename, linenum, 'whitespace/parens', 5,
2433 error(filename, linenum, 'whitespace/parens', 5,
2436 error(filename, linenum, 'whitespace/parens', 5,
2442 error(filename, linenum, 'whitespace/comma', 3,
2450 error(filename, linenum, 'whitespace/semicolon', 3,
2454 CheckSpacingForFunctionCall(filename, line, linenum, error)
2461 error(filename, linenum, 'whitespace/braces', 5,
2466 error(filename, linenum, 'whitespace/braces', 5,
2472 error(filename, linenum, 'whitespace/braces', 5,
2479 error(filename, linenum, 'whitespace/semicolon', 5,
2482 error(filename, linenum, 'whitespace/semicolon', 5,
2487 error(filename, linenum, 'whitespace/semicolon', 5,
2495 error(filename, linenum, 'whitespace/forcolon', 2,
2499 def CheckSectionSpacing(filename, clean_lines, class_info, linenum, error): argument
2550 error(filename, linenum, 'whitespace/blank_line', 3,
2577 def CheckBraces(filename, clean_lines, linenum, error): argument
2600 error(filename, linenum, 'whitespace/braces', 4,
2607 error(filename, linenum, 'whitespace/newline', 4,
2620 error(filename, linenum, 'readability/braces', 5,
2623 error(filename, linenum, 'readability/braces', 5,
2628 error(filename, linenum, 'whitespace/newline', 4,
2633 error(filename, linenum, 'whitespace/newline', 4,
2649 error(filename, linenum, 'readability/braces', 4,
2653 def CheckEmptyLoopBody(filename, clean_lines, linenum, error): argument
2676 error(filename, end_linenum, 'whitespace/empty_loop_body', 5,
2715 def CheckCheck(filename, clean_lines, linenum, error): argument
2741 error(filename, linenum, 'readability/check', 2,
2748 def CheckAltTokens(filename, clean_lines, linenum, error): argument
2775 error(filename, linenum, 'readability/alt_tokens', 2,
2802 def CheckStyle(filename, clean_lines, linenum, file_extension, nesting_state, argument
2824 error(filename, linenum, 'whitespace/tab', 1,
2844 error(filename, linenum, 'whitespace/end_of_line', 4,
2849 error(filename, linenum, 'whitespace/indent', 3,
2855 error(filename, linenum, 'whitespace/labels', 4,
2865 cppvar = GetHeaderGuardCPPVariable(filename)
2883 error(filename, linenum, 'whitespace/line_length', 4,
2886 error(filename, linenum, 'whitespace/line_length', 2,
2898 error(filename, linenum, 'whitespace/newline', 0,
2902 CheckBraces(filename, clean_lines, linenum, error)
2903 CheckEmptyLoopBody(filename, clean_lines, linenum, error)
2904 CheckAccess(filename, clean_lines, linenum, nesting_state, error)
2905 CheckSpacing(filename, clean_lines, linenum, nesting_state, error)
2906 CheckCheck(filename, clean_lines, linenum, error)
2907 CheckAltTokens(filename, clean_lines, linenum, error)
2910 CheckSectionSpacing(filename, clean_lines, classinfo, linenum, error)
2923 def _DropCommonSuffixes(filename): argument
2944 if (filename.endswith(suffix) and len(filename) > len(suffix) and
2945 filename[-len(suffix) - 1] in ('-', '_')):
2946 return filename[:-len(suffix) - 1]
2947 return os.path.splitext(filename)[0]
2950 def _IsTestFilename(filename): argument
2959 if (filename.endswith('_test.cc') or
2960 filename.endswith('_unittest.cc') or
2961 filename.endswith('_regtest.cc')):
3028 def CheckIncludeLine(filename, clean_lines, linenum, include_state, error): argument
3042 fileinfo = FileInfo(filename)
3048 error(filename, linenum, 'build/include', 4,
3059 error(filename, linenum, 'build/include', 4,
3061 (include, filename, include_state[include]))
3079 error(filename, linenum, 'build/include_order', 4,
3083 error(filename, linenum, 'build/include_alpha', 4,
3092 if not _IsTestFilename(filename):
3093 error(filename, linenum, 'readability/streams', 3,
3153 def CheckLanguage(filename, clean_lines, linenum, file_extension, include_state, argument
3176 CheckIncludeLine(filename, clean_lines, linenum, include_state, error)
3188 fullname = os.path.abspath(filename).replace('\\', '/')
3213 error(filename, linenum, 'runtime/references', 2,
3242 error(filename, linenum, 'readability/casting', 4,
3247 CheckCStyleCast(filename, linenum, line, clean_lines.raw_lines[linenum],
3255 if CheckCStyleCast(filename, linenum, line, clean_lines.raw_lines[linenum],
3260 CheckCStyleCast(filename, linenum, line, clean_lines.raw_lines[linenum],
3268 error(filename, linenum, 'runtime/casting', 4,
3284 error(filename, linenum, 'runtime/string', 4,
3290 if Search(r'\bdynamic_cast<', line) and not _IsTestFilename(filename):
3291 error(filename, linenum, 'runtime/rtti', 5,
3297 error(filename, linenum, 'runtime/init', 4,
3312 error(filename, linenum, 'runtime/int', 4,
3317 error(filename, linenum, 'runtime/int', 4,
3324 error(filename, linenum, 'runtime/printf', 3,
3330 error(filename, linenum, 'runtime/printf', 5,
3334 error(filename, linenum, 'runtime/printf', 4,
3338 error(filename, linenum, 'runtime/printf', 1,
3348 error(filename, linenum, 'runtime/operator', 4,
3354 error(filename, linenum, 'readability/braces', 4,
3370 error(filename, linenum, 'runtime/printf', 4,
3377 error(filename, linenum, 'runtime/memset', 4,
3382 error(filename, linenum, 'build/namespaces', 5,
3421 error(filename, linenum, 'runtime/arrays', 1,
3442 error(filename, linenum, 'readability/constructors', 3,
3451 error(filename, linenum, 'build/namespaces', 4,
3457 def CheckCStyleCast(filename, linenum, line, raw_line, cast_type, pattern, argument
3484 error(filename, linenum, 'runtime/sizeof', 1,
3513 error(filename, linenum, 'readability/function', 3,
3518 error(filename, linenum, 'readability/casting', 4,
3638 def UpdateIncludeState(filename, include_state, io=codecs): argument
3651 headerfile = io.open(filename, 'r', 'utf8', 'replace')
3663 include_state.setdefault(include, '%s:%d' % (filename, linenum))
3667 def CheckForIncludeWhatYouUse(filename, clean_lines, include_state, error, argument
3723 abs_filename = FileInfo(filename).FullName()
3748 if filename.endswith('.cc') and not header_found:
3755 error(filename, required[required_header_unstripped][0],
3763 def CheckMakePairUsesDeduction(filename, clean_lines, linenum, error): argument
3779 error(filename, linenum, 'build/explicit_make_pair',
3785 def ProcessLine(filename, file_extension, clean_lines, line, argument
3807 ParseNolintSuppressions(filename, raw_lines[line], line, error)
3808 nesting_state.Update(filename, clean_lines, line, error)
3811 CheckForFunctionLengths(filename, clean_lines, line, function_state, error)
3812 CheckForMultilineCommentsAndStrings(filename, clean_lines, line, error)
3813 CheckStyle(filename, clean_lines, line, file_extension, nesting_state, error)
3814 CheckLanguage(filename, clean_lines, line, file_extension, include_state,
3816 CheckForNonStandardConstructs(filename, clean_lines, line,
3818 CheckPosixThreading(filename, clean_lines, line, error)
3819 CheckInvalidIncrement(filename, clean_lines, line, error)
3820 CheckMakePairUsesDeduction(filename, clean_lines, line, error)
3822 check_fn(filename, clean_lines, line, error)
3824 def ProcessFileData(filename, file_extension, lines, error, argument
3848 CheckForCopyright(filename, lines, error)
3851 CheckForHeaderGuard(filename, lines, error)
3853 RemoveMultiLineComments(filename, lines, error)
3856 ProcessLine(filename, file_extension, clean_lines, line,
3859 nesting_state.CheckClassFinished(filename, error)
3861 CheckForIncludeWhatYouUse(filename, clean_lines, include_state, error)
3865 CheckForUnicodeReplacementCharacters(filename, lines, error)
3867 CheckForNewlineAtEOF(filename, lines, error)
3869 def ProcessFile(filename, vlevel, extra_check_functions=[]): argument
3896 if filename == '-':
3902 lines = codecs.open(filename, 'r', 'utf8', 'replace').read().split('\n')
3913 "Skipping input '%s': Can't open for reading\n" % filename)
3917 file_extension = filename[filename.rfind('.') + 1:]
3921 if (filename != '-' and file_extension != 'cc' and file_extension != 'h'
3923 sys.stderr.write('Ignoring %s; not a .cc or .h file\n' % filename)
3925 ProcessFileData(filename, file_extension, lines, Error,
3930 Error(filename, 0, 'whitespace/newline', 1,
3934 sys.stderr.write('Done processing %s\n' % filename)
4031 for filename in filenames:
4032 ProcessFile(filename, _cpplint_state.verbose_level)