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
719 error(filename, linenum, 'readability/fn_size', error_level,
742 def __init__(self, filename): argument
743 self._filename = filename
852 def Error(filename, linenum, category, confidence, message): argument
878 filename, linenum, message, category, confidence))
881 filename, linenum, message, category, confidence))
884 filename, linenum, message, category, confidence))
954 def RemoveMultiLineComments(filename, lines, error): argument
963 error(filename, lineix_begin + 1, 'readability/multiline_comment', 5,
1098 def CheckForCopyright(filename, lines, error): argument
1106 error(filename, 0, 'legal/copyright', 5,
1111 def GetHeaderGuardCPPVariable(filename): argument
1125 filename = re.sub(r'_flymake\.h$', '.h', filename)
1126 filename = re.sub(r'/\.flymake/([^/]*)$', r'/\1', filename)
1128 fileinfo = FileInfo(filename)
1135 def CheckForHeaderGuard(filename, lines, error): argument
1147 cppvar = GetHeaderGuardCPPVariable(filename)
1170 error(filename, 0, 'build/header_guard', 5,
1176 error(filename, 0, 'build/header_guard', 5,
1188 ParseNolintSuppressions(filename, lines[ifndef_linenum], ifndef_linenum,
1190 error(filename, ifndef_linenum, 'build/header_guard', error_level,
1194 error(filename, 0, 'build/header_guard', 5,
1204 ParseNolintSuppressions(filename, lines[endif_linenum], endif_linenum,
1206 error(filename, endif_linenum, 'build/header_guard', error_level,
1210 def CheckForUnicodeReplacementCharacters(filename, lines, error): argument
1225 error(filename, linenum, 'readability/utf8', 5,
1229 def CheckForNewlineAtEOF(filename, lines, error): argument
1243 error(filename, len(lines) - 2, 'whitespace/ending_newline', 5,
1247 def CheckForMultilineCommentsAndStrings(filename, clean_lines, linenum, error): argument
1271 error(filename, linenum, 'readability/multiline_comment', 5,
1279 error(filename, linenum, 'readability/multiline_string', 5,
1302 def CheckPosixThreading(filename, clean_lines, linenum, error): argument
1323 error(filename, linenum, 'runtime/threadsafe_fn', 2,
1335 def CheckInvalidIncrement(filename, clean_lines, linenum, error): argument
1353 error(filename, linenum, 'runtime/invalid_increment', 5,
1365 def CheckBegin(self, filename, clean_lines, linenum, error): argument
1380 def CheckEnd(self, filename, clean_lines, linenum, error): argument
1421 def CheckBegin(self, filename, clean_lines, linenum, error): argument
1435 def CheckEnd(self, filename, clean_lines, linenum, error): argument
1471 error(filename, linenum, 'readability/namespace', 5,
1477 error(filename, linenum, 'readability/namespace', 5,
1584 def Update(self, filename, clean_lines, linenum, error): argument
1676 self.stack[-1].CheckBegin(filename, clean_lines, linenum, error)
1716 self.stack[-1].CheckEnd(filename, clean_lines, linenum, error)
1732 def CheckClassFinished(self, filename, error): argument
1745 error(filename, obj.starting_linenum, 'build/class', 5,
1750 def CheckForNonStandardConstructs(filename, clean_lines, linenum, argument
1783 error(filename, linenum, 'runtime/printf_format', 3,
1787 error(filename, linenum, 'runtime/printf_format', 2,
1794 error(filename, linenum, 'build/printf_format', 3,
1805 error(filename, linenum, 'build/storage_class', 5,
1809 error(filename, linenum, 'build/endif_comment', 5,
1813 error(filename, linenum, 'build/forward_decl', 5,
1818 error(filename, linenum, 'build/deprecated', 3,
1829 error(filename, linenum, 'runtime/member_string_references', 2,
1853 error(filename, linenum, 'runtime/explicit', 5,
1857 def CheckSpacingForFunctionCall(filename, line, linenum, error): argument
1901 error(filename, linenum, 'whitespace/parens', 4,
1904 error(filename, linenum, 'whitespace/parens', 2,
1909 error(filename, linenum, 'whitespace/parens', 4,
1917 error(filename, linenum, 'whitespace/parens', 2,
1920 error(filename, linenum, 'whitespace/parens', 2,
1939 def CheckForFunctionLengths(filename, clean_lines, linenum, argument
2000 error(filename, linenum, 'readability/fn_size', 5,
2003 function_state.Check(error, filename, linenum)
2012 def CheckComment(comment, filename, linenum, error): argument
2026 error(filename, linenum, 'whitespace/todo', 2,
2031 error(filename, linenum, 'readability/todo', 2,
2038 error(filename, linenum, 'whitespace/todo', 2,
2041 def CheckAccess(filename, clean_lines, linenum, nesting_state, error): argument
2061 error(filename, linenum, 'readability/constructors', 3,
2199 def CheckSpacing(filename, clean_lines, linenum, nesting_state, error): argument
2270 error(filename, linenum, 'whitespace/blank_line', 2,
2285 error(filename, linenum, 'whitespace/blank_line', 3,
2290 error(filename, linenum, 'whitespace/blank_line', 3,
2306 error(filename, linenum, 'whitespace/comments', 2,
2322 error(filename, linenum, 'whitespace/comments', 4,
2324 CheckComment(line[commentpos:], filename, linenum, error)
2336 error(filename, linenum, 'whitespace/operators', 4,
2349 error(filename, linenum, 'whitespace/operators', 3,
2355 error(filename, linenum, 'whitespace/operators', 3,
2368 error(filename, linenum, 'whitespace/operators', 3,
2378 error(filename, linenum, 'whitespace/operators', 3,
2395 error(filename, linenum, 'whitespace/operators', 3,
2401 error(filename, linenum, 'whitespace/operators', 4,
2407 error(filename, linenum, 'whitespace/parens', 5,
2423 error(filename, linenum, 'whitespace/parens', 5,
2426 error(filename, linenum, 'whitespace/parens', 5,
2432 error(filename, linenum, 'whitespace/comma', 3,
2440 error(filename, linenum, 'whitespace/semicolon', 3,
2444 CheckSpacingForFunctionCall(filename, line, linenum, error)
2451 error(filename, linenum, 'whitespace/braces', 5,
2456 error(filename, linenum, 'whitespace/braces', 5,
2462 error(filename, linenum, 'whitespace/braces', 5,
2469 error(filename, linenum, 'whitespace/semicolon', 5,
2472 error(filename, linenum, 'whitespace/semicolon', 5,
2477 error(filename, linenum, 'whitespace/semicolon', 5,
2485 error(filename, linenum, 'whitespace/forcolon', 2,
2489 def CheckSectionSpacing(filename, clean_lines, class_info, linenum, error): argument
2540 error(filename, linenum, 'whitespace/blank_line', 3,
2567 def CheckBraces(filename, clean_lines, linenum, error): argument
2590 error(filename, linenum, 'whitespace/braces', 4,
2597 error(filename, linenum, 'whitespace/newline', 4,
2610 error(filename, linenum, 'readability/braces', 5,
2613 error(filename, linenum, 'readability/braces', 5,
2618 error(filename, linenum, 'whitespace/newline', 4,
2623 error(filename, linenum, 'whitespace/newline', 4,
2639 error(filename, linenum, 'readability/braces', 4,
2643 def CheckEmptyLoopBody(filename, clean_lines, linenum, error): argument
2666 error(filename, end_linenum, 'whitespace/empty_loop_body', 5,
2705 def CheckCheck(filename, clean_lines, linenum, error): argument
2731 error(filename, linenum, 'readability/check', 2,
2738 def CheckAltTokens(filename, clean_lines, linenum, error): argument
2765 error(filename, linenum, 'readability/alt_tokens', 2,
2792 def CheckStyle(filename, clean_lines, linenum, file_extension, nesting_state, argument
2814 error(filename, linenum, 'whitespace/tab', 1,
2834 error(filename, linenum, 'whitespace/end_of_line', 4,
2839 error(filename, linenum, 'whitespace/indent', 3,
2845 error(filename, linenum, 'whitespace/labels', 4,
2855 cppvar = GetHeaderGuardCPPVariable(filename)
2873 error(filename, linenum, 'whitespace/line_length', 4,
2876 error(filename, linenum, 'whitespace/line_length', 2,
2888 error(filename, linenum, 'whitespace/newline', 0,
2892 CheckBraces(filename, clean_lines, linenum, error)
2893 CheckEmptyLoopBody(filename, clean_lines, linenum, error)
2894 CheckAccess(filename, clean_lines, linenum, nesting_state, error)
2895 CheckSpacing(filename, clean_lines, linenum, nesting_state, error)
2896 CheckCheck(filename, clean_lines, linenum, error)
2897 CheckAltTokens(filename, clean_lines, linenum, error)
2900 CheckSectionSpacing(filename, clean_lines, classinfo, linenum, error)
2913 def _DropCommonSuffixes(filename): argument
2934 if (filename.endswith(suffix) and len(filename) > len(suffix) and
2935 filename[-len(suffix) - 1] in ('-', '_')):
2936 return filename[:-len(suffix) - 1]
2937 return os.path.splitext(filename)[0]
2940 def _IsTestFilename(filename): argument
2949 if (filename.endswith('_test.cc') or
2950 filename.endswith('_unittest.cc') or
2951 filename.endswith('_regtest.cc')):
3018 def CheckIncludeLine(filename, clean_lines, linenum, include_state, error): argument
3032 fileinfo = FileInfo(filename)
3038 error(filename, linenum, 'build/include', 4,
3049 error(filename, linenum, 'build/include', 4,
3051 (include, filename, include_state[include]))
3069 error(filename, linenum, 'build/include_order', 4,
3073 error(filename, linenum, 'build/include_alpha', 4,
3082 if not _IsTestFilename(filename):
3083 error(filename, linenum, 'readability/streams', 3,
3143 def CheckLanguage(filename, clean_lines, linenum, file_extension, include_state, argument
3166 CheckIncludeLine(filename, clean_lines, linenum, include_state, error)
3178 fullname = os.path.abspath(filename).replace('\\', '/')
3203 error(filename, linenum, 'runtime/references', 2,
3232 error(filename, linenum, 'readability/casting', 4,
3237 CheckCStyleCast(filename, linenum, line, clean_lines.raw_lines[linenum],
3245 if CheckCStyleCast(filename, linenum, line, clean_lines.raw_lines[linenum],
3250 CheckCStyleCast(filename, linenum, line, clean_lines.raw_lines[linenum],
3258 error(filename, linenum, 'runtime/casting', 4,
3274 error(filename, linenum, 'runtime/string', 4,
3280 if Search(r'\bdynamic_cast<', line) and not _IsTestFilename(filename):
3281 error(filename, linenum, 'runtime/rtti', 5,
3287 error(filename, linenum, 'runtime/init', 4,
3302 error(filename, linenum, 'runtime/int', 4,
3307 error(filename, linenum, 'runtime/int', 4,
3314 error(filename, linenum, 'runtime/printf', 3,
3320 error(filename, linenum, 'runtime/printf', 5,
3324 error(filename, linenum, 'runtime/printf', 4,
3328 error(filename, linenum, 'runtime/printf', 1,
3338 error(filename, linenum, 'runtime/operator', 4,
3344 error(filename, linenum, 'readability/braces', 4,
3360 error(filename, linenum, 'runtime/printf', 4,
3367 error(filename, linenum, 'runtime/memset', 4,
3372 error(filename, linenum, 'build/namespaces', 5,
3411 error(filename, linenum, 'runtime/arrays', 1,
3432 error(filename, linenum, 'readability/constructors', 3,
3441 error(filename, linenum, 'build/namespaces', 4,
3447 def CheckCStyleCast(filename, linenum, line, raw_line, cast_type, pattern, argument
3474 error(filename, linenum, 'runtime/sizeof', 1,
3503 error(filename, linenum, 'readability/function', 3,
3508 error(filename, linenum, 'readability/casting', 4,
3628 def UpdateIncludeState(filename, include_state, io=codecs): argument
3641 headerfile = io.open(filename, 'r', 'utf8', 'replace')
3653 include_state.setdefault(include, '%s:%d' % (filename, linenum))
3657 def CheckForIncludeWhatYouUse(filename, clean_lines, include_state, error, argument
3713 abs_filename = FileInfo(filename).FullName()
3738 if filename.endswith('.cc') and not header_found:
3745 error(filename, required[required_header_unstripped][0],
3753 def CheckMakePairUsesDeduction(filename, clean_lines, linenum, error): argument
3769 error(filename, linenum, 'build/explicit_make_pair',
3775 def ProcessLine(filename, file_extension, clean_lines, line, argument
3797 ParseNolintSuppressions(filename, raw_lines[line], line, error)
3798 nesting_state.Update(filename, clean_lines, line, error)
3801 CheckForFunctionLengths(filename, clean_lines, line, function_state, error)
3802 CheckForMultilineCommentsAndStrings(filename, clean_lines, line, error)
3803 CheckStyle(filename, clean_lines, line, file_extension, nesting_state, error)
3804 CheckLanguage(filename, clean_lines, line, file_extension, include_state,
3806 CheckForNonStandardConstructs(filename, clean_lines, line,
3808 CheckPosixThreading(filename, clean_lines, line, error)
3809 CheckInvalidIncrement(filename, clean_lines, line, error)
3810 CheckMakePairUsesDeduction(filename, clean_lines, line, error)
3812 check_fn(filename, clean_lines, line, error)
3814 def ProcessFileData(filename, file_extension, lines, error, argument
3838 CheckForCopyright(filename, lines, error)
3841 CheckForHeaderGuard(filename, lines, error)
3843 RemoveMultiLineComments(filename, lines, error)
3846 ProcessLine(filename, file_extension, clean_lines, line,
3849 nesting_state.CheckClassFinished(filename, error)
3851 CheckForIncludeWhatYouUse(filename, clean_lines, include_state, error)
3855 CheckForUnicodeReplacementCharacters(filename, lines, error)
3857 CheckForNewlineAtEOF(filename, lines, error)
3859 def ProcessFile(filename, vlevel, extra_check_functions=[]): argument
3886 if filename == '-':
3892 lines = codecs.open(filename, 'r', 'utf8', 'replace').read().split('\n')
3903 "Skipping input '%s': Can't open for reading\n" % filename)
3907 file_extension = filename[filename.rfind('.') + 1:]
3911 if (filename != '-' and file_extension != 'cc' and file_extension != 'h'
3913 sys.stderr.write('Ignoring %s; not a .cc or .h file\n' % filename)
3915 ProcessFileData(filename, file_extension, lines, Error,
3920 Error(filename, 0, 'whitespace/newline', 1,
3924 sys.stderr.write('Done processing %s\n' % filename)
4016 for filename in filenames:
4017 ProcessFile(filename, _cpplint_state.verbose_level)