From c98ef2d7c629708d626e602d221f053ef74d4e34 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Wed, 26 Apr 2023 18:25:07 +0200 Subject: build(clint): fix deprecation and linter warnings `sre_compile` is deprecated in python 11, and gives warning when is used. --- src/clint.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/clint.py') diff --git a/src/clint.py b/src/clint.py index 155f5f2ce5..a6649763c2 100755 --- a/src/clint.py +++ b/src/clint.py @@ -42,7 +42,6 @@ import copy import getopt import os import re -import sre_compile import string import sys import json @@ -308,14 +307,14 @@ def Match(pattern, s): # performance reasons; factoring it out into a separate function turns out # to be noticeably expensive. if pattern not in _regexp_compile_cache: - _regexp_compile_cache[pattern] = sre_compile.compile(pattern) + _regexp_compile_cache[pattern] = re.compile(pattern) return _regexp_compile_cache[pattern].match(s) def Search(pattern, s): """Searches the string for the pattern, caching the compiled regexp.""" if pattern not in _regexp_compile_cache: - _regexp_compile_cache[pattern] = sre_compile.compile(pattern) + _regexp_compile_cache[pattern] = re.compile(pattern) return _regexp_compile_cache[pattern].search(s) @@ -2810,6 +2809,8 @@ def ParseArguments(args): Returns: The list of filenames to lint. """ + opts = [] + filenames = [] try: (opts, filenames) = getopt.getopt(args, '', ['help', 'output=', -- cgit From e2fdd53d8c015913e8be4ff708fc3488558c8906 Mon Sep 17 00:00:00 2001 From: bfredl Date: Sun, 14 May 2023 18:45:56 +0200 Subject: refactor(map): avoid duplicated khash_t types for values This reduces the total number of khash_t instantiations from 22 to 8. Make the khash internal functions take the size of values as a runtime parameter. This is abstracted with typesafe Map containers which are still specialized for both key, value type. Introduce `Set(key)` type for when there is no value. Refactor shada.c to use Map/Set instead of khash directly. This requires `map_ref` operation to be more flexible. Return pointers to both key and value, plus an indicator for new_item. As a bonus, `map_key` is now redundant. Instead of Map(cstr_t, FileMarks), use a pointer map as the FileMarks struct is humongous. Make `event_strings` actually work like an intern pool instead of wtf it was doing before. --- src/clint.py | 1 + 1 file changed, 1 insertion(+) (limited to 'src/clint.py') diff --git a/src/clint.py b/src/clint.py index a6649763c2..ee2d0ecc3c 100755 --- a/src/clint.py +++ b/src/clint.py @@ -2244,6 +2244,7 @@ def CheckSpacing(filename, clean_lines, linenum, error): r'(? Date: Fri, 20 Oct 2023 15:10:33 +0200 Subject: build(lint): remove unnecessary clint.py rules Uncrustify is the source of truth where possible. Remove any redundant checks from clint.py. --- src/clint.py | 272 ++++------------------------------------------------------- 1 file changed, 16 insertions(+), 256 deletions(-) (limited to 'src/clint.py') diff --git a/src/clint.py b/src/clint.py index ee2d0ecc3c..0b72317305 100755 --- a/src/clint.py +++ b/src/clint.py @@ -45,7 +45,7 @@ import re import string import sys import json -import collections # for defaultdict +import collections _USAGE = """ @@ -149,10 +149,8 @@ Syntax: clint.py [--verbose=#] [--output=vs7] [--filter=-x,+y,...] # If you add a new error message with a new category, add it to the list # here! cpplint_unittest.py should tell you if you forget to do this. _ERROR_CATEGORIES = [ - 'build/deprecated', 'build/endif_comment', 'build/header_guard', - 'build/include_alpha', 'build/printf_format', 'build/storage_class', 'readability/bool', @@ -169,14 +167,10 @@ _ERROR_CATEGORIES = [ 'runtime/printf_format', 'runtime/threadsafe_fn', 'runtime/deprecated', - 'syntax/parenthesis', 'whitespace/alignment', - 'whitespace/braces', 'whitespace/comments', 'whitespace/indent', - 'whitespace/newline', 'whitespace/operators', - 'whitespace/parens', 'whitespace/todo', 'whitespace/cast', ] @@ -185,7 +179,7 @@ _ERROR_CATEGORIES = [ # flag. By default all errors are on, so only add here categories that should be # off by default (i.e., categories that must be enabled by the --filter= flags). # All entries here should start with a '-' or '+', as in the --filter= flag. -_DEFAULT_FILTERS = ['-build/include_alpha'] +_DEFAULT_FILTERS = [] # These constants define the current inline assembly state _NO_ASM = 0 # Outside of inline assembly block @@ -480,38 +474,6 @@ def _SetFilters(filters): _cpplint_state.SetFilters(filters) -class _FunctionState: - - """Tracks current function name and the number of lines in its body.""" - - _NORMAL_TRIGGER = 250 # for --v=0, 500 for --v=1, etc. - _TEST_TRIGGER = 400 # about 50% more than _NORMAL_TRIGGER. - - def __init__(self): - self.in_a_function = False - self.lines_in_function = 0 - self.current_function = '' - - def Begin(self, function_name): - """Start analyzing function body. - - Args: - function_name: The name of the function being tracked. - """ - self.in_a_function = True - self.lines_in_function = 0 - self.current_function = function_name - - def Count(self): - """Count line in current function body.""" - if self.in_a_function: - self.lines_in_function += 1 - - def End(self): - """Stop analyzing function body.""" - self.in_a_function = False - - class FileInfo: """Provides utility functions for filenames. @@ -1544,82 +1506,6 @@ def CheckForNonStandardConstructs(filename, clean_lines, linenum, error): error(filename, linenum, 'build/endif_comment', 5, 'Uncommented text after #endif is non-standard. Use a comment.') - if Search(r'(\w+|[+-]?\d+(\.\d*)?)\s*(<|>)\?=?\s*(\w+|[+-]?\d+)(\.\d*)?', - line): - error(filename, linenum, 'build/deprecated', 3, - '>? and . match = Search(r'[^<>=!\s](==|!=|<=|>=)[^<>=!\s]', line) if match: - error(filename, linenum, 'whitespace/operators', 3, - 'Missing spaces around %s' % match.group(1)) + return # Boolean operators should be placed on the next line. if Search(r'(?:&&|\|\|)$', line): - error(filename, linenum, 'whitespace/operators', 4, - 'Boolean operator should be placed on the same line as the start ' - 'of its right operand') + return # We allow no-spaces around << when used like this: 10<<20, but # not otherwise (particularly, not when used as streams) @@ -2113,8 +1922,7 @@ def CheckSpacing(filename, clean_lines, linenum, error): match = Search(r'[^\s<]<([^\s=<].*)', reduced_line) if (match and not FindNextMatchingAngleBracket(clean_lines, linenum, match.group(1))): - error(filename, linenum, 'whitespace/operators', 3, - 'Missing spaces around <') + return # Look for > that is not surrounded by spaces. Similar to the # above, we only trigger if both sides are missing spaces to avoid @@ -2123,8 +1931,7 @@ def CheckSpacing(filename, clean_lines, linenum, error): if (match and not FindPreviousMatchingAngleBracket(clean_lines, linenum, match.group(1))): - error(filename, linenum, 'whitespace/operators', 3, - 'Missing spaces around >') + return # We allow no-spaces around >> for almost anything. This is because # C++11 allows ">>" to close nested templates, which accounts for @@ -2162,15 +1969,9 @@ def CheckSpacing(filename, clean_lines, linenum, error): if not (match.group(3) == ';' and len(match.group(2)) == 1 + len(match.group(4)) or not match.group(2) and Search(r'\bfor\s*\(.*; \)', line)): - error(filename, linenum, 'whitespace/parens', 5, - 'Mismatching spaces inside () in %s' % match.group(1)) + return if len(match.group(2)) not in [0, 1]: - error(filename, linenum, 'whitespace/parens', 5, - 'Should have zero or one spaces inside ( and ) in %s' % - match.group(1)) - - # Next we will look for issues with function calls. - CheckSpacingForFunctionCall(filename, line, linenum, error) + return # Check whether everything inside expressions is aligned correctly if any(line.find(k) >= 0 for k in BRACES if k != '{'): @@ -2219,21 +2020,17 @@ def CheckSpacing(filename, clean_lines, linenum, error): # Make sure '} else {' has spaces. if Search(r'}else', line): - error(filename, linenum, 'whitespace/braces', 5, - 'Missing space before else') + return # You shouldn't have spaces before your brackets, except maybe after # 'delete []' or 'new char * []'. if Search(r'\w\s+\[', line): - error(filename, linenum, 'whitespace/braces', 5, - 'Extra space before [') + return if Search(r'\{(?!\})\S', line): - error(filename, linenum, 'whitespace/braces', 5, - 'Missing space after {') + return if Search(r'\S(? 20) complain = 0; - # if(match($0, " +(error|private|public|protected):")) complain = 0; - # if(match(prev, "&& *$")) complain = 0; - # if(match(prev, "\\|\\| *$")) complain = 0; - # if(match(prev, "[\",=><] *$")) complain = 0; - # if(match($0, " <<")) complain = 0; - # if(match(prev, " +for \\(")) complain = 0; - # if(prevodd && match(prevprev, " +for \\(")) complain = 0; - initial_spaces = 0 - - while initial_spaces < len(line) and line[initial_spaces] == ' ': - initial_spaces += 1 - # Some more style checks CheckBraces(filename, clean_lines, linenum, error) CheckSpacing(filename, clean_lines, linenum, error) @@ -2612,7 +2385,7 @@ def CheckLanguage(filename, clean_lines, linenum, error): def ProcessLine(filename, clean_lines, line, - function_state, nesting_state, error, + nesting_state, error, extra_check_functions=[]): """Processes a single line in the file. @@ -2621,8 +2394,6 @@ def ProcessLine(filename, clean_lines, line, clean_lines : An array of strings, each representing a line of the file, with comments stripped. line : Number of line being processed. - function_state : A _FunctionState instance which counts function - lines, etc. nesting_state : A _NestingState instance which maintains information about the current stack of nested blocks being parsed. @@ -2639,7 +2410,6 @@ def ProcessLine(filename, clean_lines, line, nesting_state.Update(clean_lines, line) if nesting_state.stack and nesting_state.stack[-1].inline_asm != _NO_ASM: return - CheckForFunctionLengths(filename, clean_lines, line, function_state, error) CheckForMultilineCommentsAndStrings(filename, clean_lines, line, error) CheckForOldStyleComments(filename, init_lines[line], line, error) CheckStyle(filename, clean_lines, line, error) @@ -2670,7 +2440,6 @@ def ProcessFileData(filename, file_extension, lines, error, lines = (['// marker so line numbers and indices both start at 1'] + lines + ['// marker so line numbers end in a known way']) - function_state = _FunctionState() nesting_state = _NestingState() ResetNolintSuppressions() @@ -2700,7 +2469,7 @@ def ProcessFileData(filename, file_extension, lines, error, clean_lines = CleansedLines(lines, init_lines) for line in range(clean_lines.NumLines()): ProcessLine(filename, clean_lines, line, - function_state, nesting_state, error, + nesting_state, error, extra_check_functions) # We check here rather than inside ProcessLine so that we see raw @@ -2744,12 +2513,10 @@ def ProcessFile(filename, vlevel, extra_check_functions=[]): lines = codecs.open( filename, 'r', 'utf8', 'replace').read().split('\n') - carriage_return_found = False # Remove trailing '\r'. for linenum in range(len(lines)): if lines[linenum].endswith('\r'): lines[linenum] = lines[linenum].rstrip('\r') - carriage_return_found = True except OSError: sys.stderr.write( @@ -2768,13 +2535,6 @@ def ProcessFile(filename, vlevel, extra_check_functions=[]): else: ProcessFileData(filename, file_extension, lines, Error, extra_check_functions) - if carriage_return_found and os.linesep != '\r\n': - # Use 0 for linenum since outputting only one error for potentially - # several lines. - Error(filename, 0, 'whitespace/newline', 1, - 'One or more unexpected \\r (^M) found;' - 'better to use only a \\n') - def PrintUsage(message): """Prints a brief usage string and exits, optionally with an error message. -- cgit From 4f8941c1a5f1ef6caa410feeb52e343db22763ce Mon Sep 17 00:00:00 2001 From: dundargoc Date: Fri, 10 Nov 2023 12:23:42 +0100 Subject: refactor: replace manual header guards with #pragma once It is less error-prone than manually defining header guards. Pretty much all compilers support it even if it's not part of the C standard. --- src/clint.py | 222 +---------------------------------------------------------- 1 file changed, 3 insertions(+), 219 deletions(-) (limited to 'src/clint.py') diff --git a/src/clint.py b/src/clint.py index 0b72317305..0a54bfc927 100755 --- a/src/clint.py +++ b/src/clint.py @@ -510,29 +510,6 @@ class FileInfo: # Don't know what to do; header guard warnings may be wrong... return fullname - def Split(self): - """Splits the file into the directory, basename, and extension. - - For 'chrome/browser/browser.cc', Split() would - return ('chrome/browser', 'browser', '.cc') - - Returns: - A tuple of (directory, basename, extension). - """ - - googlename = self.RelativePath() - project, rest = os.path.split(googlename) - return (project,) + os.path.splitext(rest) - - def BaseName(self): - """File base name - text after the final slash, before final period.""" - return self.Split()[1] - - def Extension(self): - """File extension - text following the final period.""" - return self.Split()[2] - - def _ShouldPrintError(category, confidence, linenum): """If confidence >= verbose, category passes filter and isn't suppressed.""" @@ -886,110 +863,8 @@ def CloseExpression(clean_lines, linenum, pos): return (line, clean_lines.NumLines(), -1) -def FindStartOfExpressionInLine(line, endpos, depth, startchar, endchar): - """Find position at the matching startchar. - - This is almost the reverse of FindEndOfExpressionInLine, but note - that the input position and returned position differs by 1. - - Args: - line: a CleansedLines line. - endpos: start searching at this position. - depth: nesting level at endpos. - startchar: expression opening character. - endchar: expression closing character. - - Returns: - On finding matching startchar: (index at matching startchar, 0) - Otherwise: (-1, new depth at beginning of this line) - """ - for i in range(endpos, -1, -1): - if line[i] == endchar: - depth += 1 - elif line[i] == startchar: - depth -= 1 - if depth == 0: - return (i, 0) - return (-1, depth) - - -def ReverseCloseExpression(clean_lines, linenum, pos): - """If input points to ) or } or ] or >, finds the position that opens it. - - If lines[linenum][pos] points to a ')' or '}' or ']' or '>', finds the - linenum/pos that correspond to the opening of the expression. - - Args: - clean_lines: A CleansedLines instance containing the file. - linenum: The number of the line to check. - pos: A position on the line. - - Returns: - A tuple (line, linenum, pos) pointer *at* the opening brace, or - (line, 0, -1) if we never find the matching opening brace. Note - we ignore strings and comments when matching; and the line we - return is the 'cleansed' line at linenum. - """ - line = clean_lines.elided[linenum] - endchar = line[pos] - startchar = None - if endchar not in ')}]>': - return (line, 0, -1) - if endchar == ')': - startchar = '(' - if endchar == ']': - startchar = '[' - if endchar == '}': - startchar = '{' - if endchar == '>': - startchar = '<' - - # Check last line - (start_pos, num_open) = FindStartOfExpressionInLine( - line, pos, 0, startchar, endchar) - if start_pos > -1: - return (line, linenum, start_pos) - - # Continue scanning backward - while linenum > 0: - linenum -= 1 - line = clean_lines.elided[linenum] - (start_pos, num_open) = FindStartOfExpressionInLine( - line, len(line) - 1, num_open, startchar, endchar) - if start_pos > -1: - return (line, linenum, start_pos) - - # Did not find startchar before beginning of file, give up - return (line, 0, -1) - - -def GetHeaderGuardCPPVariable(filename): - """Returns the CPP variable that should be used as a header guard. - - Args: - filename: The name of a C++ header file. - - Returns: - The CPP variable that should be used as a header guard in the - named file. - - """ - - # Restores original filename in case that cpplint is invoked from Emacs's - # flymake. - filename = re.sub(r'_flymake\.h$', '.h', filename) - filename = re.sub(r'/\.flymake/([^/]*)$', r'/\1', filename) - - fileinfo = FileInfo(filename) - file_path_from_root = fileinfo.RelativePath() - return 'NVIM_' + re.sub(r'[-./\s]', '_', file_path_from_root).upper() - - def CheckForHeaderGuard(filename, lines, error): - """Checks that the file contains a header guard. - - Logs an error if no #ifndef header guard is present. For other - headers, checks that the full pathname is used. + """Checks that the file contains "#pragma once". Args: filename: The name of the C++ header file. @@ -1001,65 +876,9 @@ def CheckForHeaderGuard(filename, lines, error): }: return - cppvar = GetHeaderGuardCPPVariable(filename) - - ifndef = None - ifndef_linenum = 0 - define = None - endif = None - endif_linenum = 0 - for linenum, line in enumerate(lines): - linesplit = line.split() - if len(linesplit) >= 2: - # find the first occurrence of #ifndef and #define, save arg - if not ifndef and linesplit[0] == '#ifndef': - # set ifndef to the header guard presented on the #ifndef line. - ifndef = linesplit[1] - ifndef_linenum = linenum - if not define and linesplit[0] == '#define': - define = linesplit[1] - # find the last occurrence of #endif, save entire line - if line.startswith('#endif'): - endif = line - endif_linenum = linenum - - if not ifndef: + if "#pragma once" not in lines: error(filename, 0, 'build/header_guard', 5, - 'No #ifndef header guard found, suggested CPP variable is: %s' % - cppvar) - return - - if not define: - error(filename, 0, 'build/header_guard', 5, - 'No #define header guard found, suggested CPP variable is: %s' % - cppvar) - return - - # The guard should be PATH_FILE_H_, but we also allow PATH_FILE_H__ - # for backward compatibility. - if ifndef != cppvar: - error_level = 0 - if ifndef != cppvar + '_': - error_level = 5 - - ParseNolintSuppressions(lines[ifndef_linenum], ifndef_linenum) - error(filename, ifndef_linenum, 'build/header_guard', error_level, - '#ifndef header guard has wrong style, please use: %s' % cppvar) - - if define != ifndef: - error(filename, 0, 'build/header_guard', 5, - '#ifndef and #define don\'t match, suggested CPP variable is: %s' - % cppvar) - return - - if endif != ('#endif // %s' % cppvar): - error_level = 0 - if endif != ('#endif // %s' % (cppvar + '_')): - error_level = 5 - - ParseNolintSuppressions(lines[endif_linenum], endif_linenum) - error(filename, endif_linenum, 'build/header_guard', error_level, - '#endif line should be "#endif // %s"' % cppvar) + 'No "#pragma once" found in header') def CheckForBadCharacters(filename, lines, error): @@ -1982,41 +1801,6 @@ def CheckSpacing(filename, clean_lines, linenum, error): # braces. And since you should never have braces at the beginning of a line, # this is an easy test. match = Match(r'^(.*[^ ({]){', line) - if match: - # Try a bit harder to check for brace initialization. This - # happens in one of the following forms: - # Constructor() : initializer_list_{} { ... } - # Constructor{}.MemberFunction() - # Type variable{}; - # FunctionCall(type{}, ...); - # LastArgument(..., type{}); - # LOG(INFO) << type{} << " ..."; - # map_of_type[{...}] = ...; - # - # We check for the character following the closing brace, and - # silence the warning if it's one of those listed above, i.e. - # "{.;,)<]". - # - # To account for nested initializer list, we allow any number of - # closing braces up to "{;,)<". We can't simply silence the - # warning on first sight of closing brace, because that would - # cause false negatives for things that are not initializer lists. - # Silence this: But not this: - # Outer{ if (...) { - # Inner{...} if (...){ // Missing space before { - # }; } - # - # There is a false negative with this approach if people inserted - # spurious semicolons, e.g. "if (cond){};", but we will catch the - # spurious semicolon with a separate check. - (endline, endlinenum, endpos) = CloseExpression( - clean_lines, linenum, len(match.group(1))) - trailing_text = '' - if endpos > -1: - trailing_text = endline[endpos:] - for offset in range(endlinenum + 1, - min(endlinenum + 3, clean_lines.NumLines() - 1)): - trailing_text += clean_lines.elided[offset] # Make sure '} else {' has spaces. if Search(r'}else', line): -- cgit From a6e3d93421ba13c407a96fac9cc01fa41ec7ad98 Mon Sep 17 00:00:00 2001 From: dundargoc Date: Thu, 16 Nov 2023 10:59:11 +0100 Subject: refactor: enable formatting for ternaries This requires removing the "Inner expression should be aligned" rule from clint as it prevents essentially any formatting regarding ternary operators. --- src/clint.py | 84 +----------------------------------------------------------- 1 file changed, 1 insertion(+), 83 deletions(-) (limited to 'src/clint.py') diff --git a/src/clint.py b/src/clint.py index 0a54bfc927..63182a4349 100755 --- a/src/clint.py +++ b/src/clint.py @@ -167,7 +167,6 @@ _ERROR_CATEGORIES = [ 'runtime/printf_format', 'runtime/threadsafe_fn', 'runtime/deprecated', - 'whitespace/alignment', 'whitespace/comments', 'whitespace/indent', 'whitespace/operators', @@ -1504,87 +1503,6 @@ def FindPreviousMatchingAngleBracket(clean_lines, linenum, init_prefix): # Exhausted all earlier lines and still no matching angle bracket. return False - -def CheckExpressionAlignment(filename, clean_lines, linenum, error, startpos=0): - """Checks for the correctness of alignment inside expressions - - Args: - filename: The name of the current file. - clean_lines: A CleansedLines instance containing the file. - linenum: The number of the line to check. - error: The function to call with any errors found. - startpos: Position where to start searching for expression start. - """ - level_starts = {} - line = clean_lines.elided_with_space_strings[linenum] - prev_line_start = Search(r'\S', line).start() - depth_line_starts = {} - pos = min([ - idx - for idx in ( - line.find(k, startpos) - for k in BRACES - if k != '{' - ) - if idx >= 0 - ] + [len(line) + 1]) - if pos == len(line) + 1: - return - ignore_error_levels = set() - firstlinenum = linenum - for linenum, pos, brace, depth in GetExprBracesPosition( - clean_lines, linenum, pos - ): - line = clean_lines.elided_with_space_strings[linenum] - if depth is None: - if pos < len(line) - 1: - CheckExpressionAlignment(filename, clean_lines, linenum, error, - pos + 1) - return - elif depth <= 0: - return - if brace == 's': - assert firstlinenum != linenum - if level_starts[depth][1]: - if line[pos] == BRACES[depth_line_starts[depth][1]]: - if pos != depth_line_starts[depth][0]: - if depth not in ignore_error_levels: - error(filename, linenum, 'whitespace/indent', 2, - 'End of the inner expression should have ' - 'the same indent as start') - else: - if (pos != level_starts[depth][0] + 1 - + (level_starts[depth][2] == '{')): - if depth not in ignore_error_levels: - error(filename, linenum, 'whitespace/alignment', 2, - ('Inner expression should be aligned ' - 'as opening brace + 1 (+ 2 in case of {{). ' - 'Relevant opening is on line {0!r}').format( - level_starts[depth][3])) - prev_line_start = pos - elif brace == 'e': - pass - else: - opening = brace in BRACES - if opening: - # Only treat {} as part of the expression if it is preceded by - # "=" (brace initializer) or "(type)" (construct like (struct - # foo) { ... }). - if brace == '{' and not (Search( - r'(?:= *|\((?:struct )?\w+(\s*\[\w*\])?\)) *$', - line[:pos]) - ): - ignore_error_levels.add(depth) - line_ended_with_opening = ( - pos == len(line) - 2 * (line.endswith(' \\')) - 1) - level_starts[depth] = (pos, line_ended_with_opening, brace, - linenum) - if line_ended_with_opening: - depth_line_starts[depth] = (prev_line_start, brace) - else: - del level_starts[depth] - - def CheckSpacing(filename, clean_lines, linenum, error): """Checks for the correctness of various spacing issues in the code. @@ -1794,7 +1712,7 @@ def CheckSpacing(filename, clean_lines, linenum, error): # Check whether everything inside expressions is aligned correctly if any(line.find(k) >= 0 for k in BRACES if k != '{'): - CheckExpressionAlignment(filename, clean_lines, linenum, error) + return # Except after an opening paren, or after another opening brace (in case of # an initializer list, for instance), you should have spaces before your -- cgit From ce6075f82a2a8ff9c3e2d0074e1cd56457e5507f Mon Sep 17 00:00:00 2001 From: dundargoc Date: Sun, 26 Nov 2023 13:24:38 +0100 Subject: build: add check to clint to prevent non-defs header includes Also enable iwyu on headers, but add an ignore for each file separately. Work on https://github.com/neovim/neovim/issues/6371. --- src/clint.py | 192 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 192 insertions(+) (limited to 'src/clint.py') diff --git a/src/clint.py b/src/clint.py index 63182a4349..cda7c0e580 100755 --- a/src/clint.py +++ b/src/clint.py @@ -151,6 +151,7 @@ Syntax: clint.py [--verbose=#] [--output=vs7] [--filter=-x,+y,...] _ERROR_CATEGORIES = [ 'build/endif_comment', 'build/header_guard', + 'build/include_defs', 'build/printf_format', 'build/storage_class', 'readability/bool', @@ -879,6 +880,196 @@ def CheckForHeaderGuard(filename, lines, error): error(filename, 0, 'build/header_guard', 5, 'No "#pragma once" found in header') +def CheckIncludes(filename, lines, error): + """Checks that headers only include _defs headers + + Args: + filename: The name of the C++ header file. + lines: An array of strings, each representing a line of the file. + error: The function to call with any errors found. + """ + if filename.endswith('.c.h') or filename.endswith('.in.h') or FileInfo(filename).RelativePath() in { + 'func_attr.h', + }: + return + + check_includes_ignore = [ + "api/command.h", + "api/deprecated.h", + "api/extmark.h", + "api/keysets.h", + "api/options.h", + "api/private/converter.h", + "api/private/defs.h", + "api/private/dispatch.h", + "api/private/helpers.h", + "api/private/validate.h", + "api/tabpage.h", + "api/ui.h", + "api/vim.h", + "api/vimscript.h", + "api/win_config.h", + "arglist.h", + "arglist_defs.h", + "ascii.h", + "assert.h", + "autocmd.h", + "buffer.h", + "buffer_defs.h", + "buffer_updates.h", + "change.h", + "channel.h", + "charset.h", + "cmdexpand.h", + "cmdexpand_defs.h", + "cmdhist.h", + "context.h", + "cursor.h", + "cursor_shape.h", + "decoration.h", + "decoration_defs.h", + "decoration_provider.h", + "diff.h", + "digraph.h", + "drawline.h", + "drawscreen.h", + "edit.h", + "eval.h", + "eval/decode.h", + "eval/encode.h", + "eval/funcs.h", + "eval/typval.h", + "eval/typval_defs.h", + "eval/typval_encode.h", + "eval/userfunc.h", + "event/libuv_process.h", + "event/loop.h", + "event/multiqueue.h", + "event/process.h", + "event/rstream.h", + "event/signal.h", + "event/socket.h", + "event/stream.h", + "event/time.h", + "event/wstream.h", + "ex_cmds.h", + "ex_cmds_defs.h", + "ex_docmd.h", + "ex_eval_defs.h", + "ex_getln.h", + "extmark_defs.h", + "file_search.h", + "fileio.h", + "fold.h", + "fold_defs.h", + "garray.h", + "getchar.h", + "getchar_defs.h", + "globals.h", + "grid.h", + "grid_defs.h", + "hashtab.h", + "highlight.h", + "highlight_defs.h", + "highlight_group.h", + "iconv.h", + "indent.h", + "indent_c.h", + "input.h", + "insexpand.h", + "keycodes.h", + "linematch.h", + "log.h", + "lua/converter.h", + "lua/executor.h", + "lua/treesitter.h", + "macros.h", + "main.h", + "map.h", + "mapping.h", + "mapping_defs.h", + "mark.h", + "mark_defs.h", + "marktree.h", + "mbyte.h", + "mbyte_defs.h", + "memfile_defs.h", + "memline.h", + "memory.h", + "menu.h", + "message.h", + "mouse.h", + "move.h", + "msgpack_rpc/channel_defs.h", + "msgpack_rpc/helpers.h", + "msgpack_rpc/unpacker.h", + "normal.h", + "nvim/extmark.h", + "ops.h", + "option.h", + "option_defs.h", + "option_vars.h", + "os/fileio.h", + "os/fs.h", + "os/input.h", + "os/lang.h", + "os/os.h", + "os/process.h", + "os/pty_conpty_win.h", + "os/pty_process_unix.h", + "os/pty_process_win.h", + "os/shell.h", + "path.h", + "plines.h", + "popupmenu.h", + "profile.h", + "quickfix.h", + "regexp.h", + "regexp_defs.h", + "runtime.h", + "search.h", + "sha256.h", + "sign_defs.h", + "spell.h", + "spell_defs.h", + "spellfile.h", + "spellsuggest.h", + "statusline.h", + "statusline_defs.h", + "strings.h", + "syntax.h", + "tag.h", + "textformat.h", + "textobject.h", + "tui/input.h", + "tui/terminfo.h", + "tui/tui.h", + "ugrid.h", + "ui.h", + "ui_client.h", + "ui_compositor.h", + "undo_defs.h", + "usercmd.h", + "version.h", + "vim.h", + "viml/parser/expressions.h", + "viml/parser/parser.h", + "window.h", + "winfloat.h", + ] + + for i in check_includes_ignore: + if filename.endswith(i): + return + + for i, line in enumerate(lines): + if("#include" in line): + if("#include <" in line): + continue + if "_defs" not in line: + error(filename, i, 'build/include_defs', 5, + 'Headers should not include non-"_defs" headers') + def CheckForBadCharacters(filename, lines, error): """Logs an error for each line containing bad characters. @@ -2166,6 +2357,7 @@ def ProcessFileData(filename, file_extension, lines, error, if file_extension == 'h': CheckForHeaderGuard(filename, lines, error) + CheckIncludes(filename, lines, error) RemoveMultiLineComments(filename, lines, error) clean_lines = CleansedLines(lines, init_lines) -- cgit From 34509bbea3e8c6a8033911aea645b1b5579f7d1a Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Sun, 26 Nov 2023 15:34:29 +0100 Subject: build: sync IWYU and clint to ignore the same headers (#26228) Also fix headers for autocmd.c. --- src/clint.py | 362 +++++++++++++++++++++++++++++++++-------------------------- 1 file changed, 200 insertions(+), 162 deletions(-) (limited to 'src/clint.py') diff --git a/src/clint.py b/src/clint.py index cda7c0e580..e302a10505 100755 --- a/src/clint.py +++ b/src/clint.py @@ -893,169 +893,207 @@ def CheckIncludes(filename, lines, error): }: return + # These should be synced with the ignored headers in the `iwyu` target in + # the Makefile. check_includes_ignore = [ - "api/command.h", - "api/deprecated.h", - "api/extmark.h", - "api/keysets.h", - "api/options.h", - "api/private/converter.h", - "api/private/defs.h", - "api/private/dispatch.h", - "api/private/helpers.h", - "api/private/validate.h", - "api/tabpage.h", - "api/ui.h", - "api/vim.h", - "api/vimscript.h", - "api/win_config.h", - "arglist.h", - "arglist_defs.h", - "ascii.h", - "assert.h", - "autocmd.h", - "buffer.h", - "buffer_defs.h", - "buffer_updates.h", - "change.h", - "channel.h", - "charset.h", - "cmdexpand.h", - "cmdexpand_defs.h", - "cmdhist.h", - "context.h", - "cursor.h", - "cursor_shape.h", - "decoration.h", - "decoration_defs.h", - "decoration_provider.h", - "diff.h", - "digraph.h", - "drawline.h", - "drawscreen.h", - "edit.h", - "eval.h", - "eval/decode.h", - "eval/encode.h", - "eval/funcs.h", - "eval/typval.h", - "eval/typval_defs.h", - "eval/typval_encode.h", - "eval/userfunc.h", - "event/libuv_process.h", - "event/loop.h", - "event/multiqueue.h", - "event/process.h", - "event/rstream.h", - "event/signal.h", - "event/socket.h", - "event/stream.h", - "event/time.h", - "event/wstream.h", - "ex_cmds.h", - "ex_cmds_defs.h", - "ex_docmd.h", - "ex_eval_defs.h", - "ex_getln.h", - "extmark_defs.h", - "file_search.h", - "fileio.h", - "fold.h", - "fold_defs.h", - "garray.h", - "getchar.h", - "getchar_defs.h", - "globals.h", - "grid.h", - "grid_defs.h", - "hashtab.h", - "highlight.h", - "highlight_defs.h", - "highlight_group.h", - "iconv.h", - "indent.h", - "indent_c.h", - "input.h", - "insexpand.h", - "keycodes.h", - "linematch.h", - "log.h", - "lua/converter.h", - "lua/executor.h", - "lua/treesitter.h", - "macros.h", - "main.h", - "map.h", - "mapping.h", - "mapping_defs.h", - "mark.h", - "mark_defs.h", - "marktree.h", - "mbyte.h", - "mbyte_defs.h", - "memfile_defs.h", - "memline.h", - "memory.h", - "menu.h", - "message.h", - "mouse.h", - "move.h", - "msgpack_rpc/channel_defs.h", - "msgpack_rpc/helpers.h", - "msgpack_rpc/unpacker.h", - "normal.h", - "nvim/extmark.h", - "ops.h", - "option.h", - "option_defs.h", - "option_vars.h", - "os/fileio.h", - "os/fs.h", - "os/input.h", - "os/lang.h", - "os/os.h", - "os/process.h", - "os/pty_conpty_win.h", - "os/pty_process_unix.h", - "os/pty_process_win.h", - "os/shell.h", - "path.h", - "plines.h", - "popupmenu.h", - "profile.h", - "quickfix.h", - "regexp.h", - "regexp_defs.h", - "runtime.h", - "search.h", - "sha256.h", - "sign_defs.h", - "spell.h", - "spell_defs.h", - "spellfile.h", - "spellsuggest.h", - "statusline.h", - "statusline_defs.h", - "strings.h", - "syntax.h", - "tag.h", - "textformat.h", - "textobject.h", - "tui/input.h", - "tui/terminfo.h", - "tui/tui.h", - "ugrid.h", - "ui.h", - "ui_client.h", - "ui_compositor.h", - "undo_defs.h", - "usercmd.h", - "version.h", - "vim.h", - "viml/parser/expressions.h", - "viml/parser/parser.h", - "window.h", - "winfloat.h", + "src/nvim/api/autocmd.h", + "src/nvim/api/buffer.h", + "src/nvim/api/command.h", + "src/nvim/api/deprecated.h", + "src/nvim/api/extmark.h", + "src/nvim/api/keysets.h", + "src/nvim/api/options.h", + "src/nvim/api/private/converter.h", + "src/nvim/api/private/defs.h", + "src/nvim/api/private/dispatch.h", + "src/nvim/api/private/helpers.h", + "src/nvim/api/private/validate.h", + "src/nvim/api/tabpage.h", + "src/nvim/api/ui.h", + "src/nvim/api/vim.h", + "src/nvim/api/vimscript.h", + "src/nvim/api/win_config.h", + "src/nvim/api/window.h", + "src/nvim/arabic.h", + "src/nvim/arglist.h", + "src/nvim/arglist_defs.h", + "src/nvim/ascii.h", + "src/nvim/assert.h", + "src/nvim/autocmd.h", + "src/nvim/base64.h", + "src/nvim/buffer.h", + "src/nvim/buffer_defs.h", + "src/nvim/buffer_updates.h", + "src/nvim/bufwrite.h", + "src/nvim/change.h", + "src/nvim/channel.h", + "src/nvim/charset.h", + "src/nvim/cmdexpand.h", + "src/nvim/cmdexpand_defs.h", + "src/nvim/cmdhist.h", + "src/nvim/context.h", + "src/nvim/cursor.h", + "src/nvim/cursor_shape.h", + "src/nvim/debugger.h", + "src/nvim/decoration.h", + "src/nvim/decoration_defs.h", + "src/nvim/decoration_provider.h", + "src/nvim/diff.h", + "src/nvim/digraph.h", + "src/nvim/drawline.h", + "src/nvim/drawscreen.h", + "src/nvim/edit.h", + "src/nvim/eval.h", + "src/nvim/eval/buffer.h", + "src/nvim/eval/decode.h", + "src/nvim/eval/encode.h", + "src/nvim/eval/executor.h", + "src/nvim/eval/funcs.h", + "src/nvim/eval/gc.h", + "src/nvim/eval/typval.h", + "src/nvim/eval/typval_defs.h", + "src/nvim/eval/typval_encode.h", + "src/nvim/eval/userfunc.h", + "src/nvim/eval/vars.h", + "src/nvim/eval/window.h", + "src/nvim/event/libuv_process.h", + "src/nvim/event/loop.h", + "src/nvim/event/multiqueue.h", + "src/nvim/event/process.h", + "src/nvim/event/rstream.h", + "src/nvim/event/signal.h", + "src/nvim/event/socket.h", + "src/nvim/event/stream.h", + "src/nvim/event/time.h", + "src/nvim/event/wstream.h", + "src/nvim/ex_cmds.h", + "src/nvim/ex_cmds2.h", + "src/nvim/ex_cmds_defs.h", + "src/nvim/ex_docmd.h", + "src/nvim/ex_eval.h", + "src/nvim/ex_eval_defs.h", + "src/nvim/ex_getln.h", + "src/nvim/ex_session.h", + "src/nvim/extmark.h", + "src/nvim/extmark_defs.h", + "src/nvim/file_search.h", + "src/nvim/fileio.h", + "src/nvim/fold.h", + "src/nvim/fold_defs.h", + "src/nvim/garray.h", + "src/nvim/getchar.h", + "src/nvim/getchar_defs.h", + "src/nvim/globals.h", + "src/nvim/grid.h", + "src/nvim/grid_defs.h", + "src/nvim/hashtab.h", + "src/nvim/help.h", + "src/nvim/highlight.h", + "src/nvim/highlight_defs.h", + "src/nvim/highlight_group.h", + "src/nvim/iconv.h", + "src/nvim/indent.h", + "src/nvim/indent_c.h", + "src/nvim/input.h", + "src/nvim/insexpand.h", + "src/nvim/keycodes.h", + "src/nvim/linematch.h", + "src/nvim/log.h", + "src/nvim/lua/base64.h", + "src/nvim/lua/converter.h", + "src/nvim/lua/executor.h", + "src/nvim/lua/secure.h", + "src/nvim/lua/spell.h", + "src/nvim/lua/stdlib.h", + "src/nvim/lua/treesitter.h", + "src/nvim/lua/xdiff.h", + "src/nvim/macros.h", + "src/nvim/main.h", + "src/nvim/map.h", + "src/nvim/mapping.h", + "src/nvim/mapping_defs.h", + "src/nvim/mark.h", + "src/nvim/mark_defs.h", + "src/nvim/marktree.h", + "src/nvim/match.h", + "src/nvim/mbyte.h", + "src/nvim/mbyte_defs.h", + "src/nvim/memfile.h", + "src/nvim/memfile_defs.h", + "src/nvim/memline.h", + "src/nvim/memory.h", + "src/nvim/menu.h", + "src/nvim/message.h", + "src/nvim/mouse.h", + "src/nvim/move.h", + "src/nvim/msgpack_rpc/channel.h", + "src/nvim/msgpack_rpc/channel_defs.h", + "src/nvim/msgpack_rpc/helpers.h", + "src/nvim/msgpack_rpc/server.h", + "src/nvim/msgpack_rpc/unpacker.h", + "src/nvim/normal.h", + "src/nvim/nvim/extmark.h", + "src/nvim/ops.h", + "src/nvim/option.h", + "src/nvim/option_defs.h", + "src/nvim/option_vars.h", + "src/nvim/optionstr.h", + "src/nvim/os/dl.h", + "src/nvim/os/fileio.h", + "src/nvim/os/fs.h", + "src/nvim/os/input.h", + "src/nvim/os/lang.h", + "src/nvim/os/os.h", + "src/nvim/os/process.h", + "src/nvim/os/pty_conpty_win.h", + "src/nvim/os/pty_process_unix.h", + "src/nvim/os/pty_process_win.h", + "src/nvim/os/shell.h", + "src/nvim/os/time.h", + "src/nvim/os/tty.h", + "src/nvim/path.h", + "src/nvim/plines.h", + "src/nvim/popupmenu.h", + "src/nvim/profile.h", + "src/nvim/quickfix.h", + "src/nvim/regexp.h", + "src/nvim/regexp_defs.h", + "src/nvim/runtime.h", + "src/nvim/search.h", + "src/nvim/sha256.h", + "src/nvim/shada.h", + "src/nvim/sign.h", + "src/nvim/sign_defs.h", + "src/nvim/spell.h", + "src/nvim/spell_defs.h", + "src/nvim/spellfile.h", + "src/nvim/spellsuggest.h", + "src/nvim/state.h", + "src/nvim/statusline.h", + "src/nvim/statusline_defs.h", + "src/nvim/strings.h", + "src/nvim/syntax.h", + "src/nvim/tag.h", + "src/nvim/terminal.h", + "src/nvim/testing.h", + "src/nvim/textformat.h", + "src/nvim/textobject.h", + "src/nvim/tui/input.h", + "src/nvim/tui/terminfo.h", + "src/nvim/tui/tui.h", + "src/nvim/ugrid.h", + "src/nvim/ui.h", + "src/nvim/ui_client.h", + "src/nvim/ui_compositor.h", + "src/nvim/undo.h", + "src/nvim/undo_defs.h", + "src/nvim/usercmd.h", + "src/nvim/version.h", + "src/nvim/vim.h", + "src/nvim/viml/parser/expressions.h", + "src/nvim/viml/parser/parser.h", + "src/nvim/window.h", + "src/nvim/winfloat.h", ] for i in check_includes_ignore: -- cgit From 6361806aa28edca55ad3316a58bc3e936df9c0eb Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sun, 26 Nov 2023 22:58:52 +0800 Subject: refactor: move garray_T to garray_defs.h (#26227) --- src/clint.py | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/clint.py') diff --git a/src/clint.py b/src/clint.py index e302a10505..79c916c0b9 100755 --- a/src/clint.py +++ b/src/clint.py @@ -916,7 +916,6 @@ def CheckIncludes(filename, lines, error): "src/nvim/api/window.h", "src/nvim/arabic.h", "src/nvim/arglist.h", - "src/nvim/arglist_defs.h", "src/nvim/ascii.h", "src/nvim/assert.h", "src/nvim/autocmd.h", @@ -1067,7 +1066,6 @@ def CheckIncludes(filename, lines, error): "src/nvim/spell.h", "src/nvim/spell_defs.h", "src/nvim/spellfile.h", - "src/nvim/spellsuggest.h", "src/nvim/state.h", "src/nvim/statusline.h", "src/nvim/statusline_defs.h", -- cgit From 71141e8cf5dfaf5d17610dba57f0e0f319a4850e Mon Sep 17 00:00:00 2001 From: dundargoc Date: Sun, 26 Nov 2023 17:25:35 +0100 Subject: build(IWYU): fix headers for arabic.h --- src/clint.py | 1 - 1 file changed, 1 deletion(-) (limited to 'src/clint.py') diff --git a/src/clint.py b/src/clint.py index 79c916c0b9..6676673afc 100755 --- a/src/clint.py +++ b/src/clint.py @@ -914,7 +914,6 @@ def CheckIncludes(filename, lines, error): "src/nvim/api/vimscript.h", "src/nvim/api/win_config.h", "src/nvim/api/window.h", - "src/nvim/arabic.h", "src/nvim/arglist.h", "src/nvim/ascii.h", "src/nvim/assert.h", -- cgit From 7e2387f41be7cd8304fe48bfa089f2bea155dd5a Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Mon, 27 Nov 2023 08:34:06 +0800 Subject: build(clint): more precise check for "defs" headers (#26236) --- src/clint.py | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) (limited to 'src/clint.py') diff --git a/src/clint.py b/src/clint.py index 6676673afc..ee2f3cc00f 100755 --- a/src/clint.py +++ b/src/clint.py @@ -890,6 +890,7 @@ def CheckIncludes(filename, lines, error): """ if filename.endswith('.c.h') or filename.endswith('.in.h') or FileInfo(filename).RelativePath() in { 'func_attr.h', + 'os/pty_process.h', }: return @@ -899,16 +900,12 @@ def CheckIncludes(filename, lines, error): "src/nvim/api/autocmd.h", "src/nvim/api/buffer.h", "src/nvim/api/command.h", - "src/nvim/api/deprecated.h", "src/nvim/api/extmark.h", - "src/nvim/api/keysets.h", "src/nvim/api/options.h", - "src/nvim/api/private/converter.h", "src/nvim/api/private/defs.h", "src/nvim/api/private/dispatch.h", "src/nvim/api/private/helpers.h", "src/nvim/api/private/validate.h", - "src/nvim/api/tabpage.h", "src/nvim/api/ui.h", "src/nvim/api/vim.h", "src/nvim/api/vimscript.h", @@ -980,7 +977,6 @@ def CheckIncludes(filename, lines, error): "src/nvim/fold_defs.h", "src/nvim/garray.h", "src/nvim/getchar.h", - "src/nvim/getchar_defs.h", "src/nvim/globals.h", "src/nvim/grid.h", "src/nvim/grid_defs.h", @@ -998,7 +994,6 @@ def CheckIncludes(filename, lines, error): "src/nvim/linematch.h", "src/nvim/log.h", "src/nvim/lua/base64.h", - "src/nvim/lua/converter.h", "src/nvim/lua/executor.h", "src/nvim/lua/secure.h", "src/nvim/lua/spell.h", @@ -1042,7 +1037,6 @@ def CheckIncludes(filename, lines, error): "src/nvim/os/input.h", "src/nvim/os/lang.h", "src/nvim/os/os.h", - "src/nvim/os/process.h", "src/nvim/os/pty_conpty_win.h", "src/nvim/os/pty_process_unix.h", "src/nvim/os/pty_process_win.h", @@ -1076,7 +1070,6 @@ def CheckIncludes(filename, lines, error): "src/nvim/textformat.h", "src/nvim/textobject.h", "src/nvim/tui/input.h", - "src/nvim/tui/terminfo.h", "src/nvim/tui/tui.h", "src/nvim/ugrid.h", "src/nvim/ui.h", @@ -1090,7 +1083,6 @@ def CheckIncludes(filename, lines, error): "src/nvim/viml/parser/expressions.h", "src/nvim/viml/parser/parser.h", "src/nvim/window.h", - "src/nvim/winfloat.h", ] for i in check_includes_ignore: @@ -1098,10 +1090,12 @@ def CheckIncludes(filename, lines, error): return for i, line in enumerate(lines): - if("#include" in line): - if("#include <" in line): - continue - if "_defs" not in line: + matched = Match(r'#\s*include\s*"([^"]*)"$', line) + if matched: + name = matched.group(1) + if (not name.endswith('.h.generated.h') and + not name.endswith('_defs.h') and + not name.endswith('/defs.h')): error(filename, i, 'build/include_defs', 5, 'Headers should not include non-"_defs" headers') -- cgit From 09541d514dd18bf86f673d3784d406236fcbdad8 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Mon, 27 Nov 2023 09:51:26 +0800 Subject: build(IWYU): replace public-to-public mappings with pragmas (#26237) --- src/clint.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/clint.py') diff --git a/src/clint.py b/src/clint.py index ee2f3cc00f..6e4d419b38 100755 --- a/src/clint.py +++ b/src/clint.py @@ -1090,7 +1090,7 @@ def CheckIncludes(filename, lines, error): return for i, line in enumerate(lines): - matched = Match(r'#\s*include\s*"([^"]*)"$', line) + matched = Match(r'#\s*include\s*"([^"]*)"', line) if matched: name = matched.group(1) if (not name.endswith('.h.generated.h') and -- cgit From 6343d414369de1f3b259e51438cd4f666d82d3d2 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Mon, 27 Nov 2023 11:17:04 +0800 Subject: refactor: move autocmd types to autocmd_defs.h (#26239) --- src/clint.py | 1 + 1 file changed, 1 insertion(+) (limited to 'src/clint.py') diff --git a/src/clint.py b/src/clint.py index 6e4d419b38..293545199b 100755 --- a/src/clint.py +++ b/src/clint.py @@ -915,6 +915,7 @@ def CheckIncludes(filename, lines, error): "src/nvim/ascii.h", "src/nvim/assert.h", "src/nvim/autocmd.h", + "src/nvim/autocmd_defs.h", "src/nvim/base64.h", "src/nvim/buffer.h", "src/nvim/buffer_defs.h", -- cgit From 574d25642fc9ca65b396633aeab6e2d32778b642 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Mon, 27 Nov 2023 17:21:58 +0800 Subject: refactor: move Arena and ArenaMem to memory_defs.h (#26240) --- src/clint.py | 30 ------------------------------ 1 file changed, 30 deletions(-) (limited to 'src/clint.py') diff --git a/src/clint.py b/src/clint.py index 293545199b..d853428cd0 100755 --- a/src/clint.py +++ b/src/clint.py @@ -916,7 +916,6 @@ def CheckIncludes(filename, lines, error): "src/nvim/assert.h", "src/nvim/autocmd.h", "src/nvim/autocmd_defs.h", - "src/nvim/base64.h", "src/nvim/buffer.h", "src/nvim/buffer_defs.h", "src/nvim/buffer_updates.h", @@ -929,8 +928,6 @@ def CheckIncludes(filename, lines, error): "src/nvim/cmdhist.h", "src/nvim/context.h", "src/nvim/cursor.h", - "src/nvim/cursor_shape.h", - "src/nvim/debugger.h", "src/nvim/decoration.h", "src/nvim/decoration_defs.h", "src/nvim/decoration_provider.h", @@ -943,9 +940,7 @@ def CheckIncludes(filename, lines, error): "src/nvim/eval/buffer.h", "src/nvim/eval/decode.h", "src/nvim/eval/encode.h", - "src/nvim/eval/executor.h", "src/nvim/eval/funcs.h", - "src/nvim/eval/gc.h", "src/nvim/eval/typval.h", "src/nvim/eval/typval_defs.h", "src/nvim/eval/typval_encode.h", @@ -963,13 +958,10 @@ def CheckIncludes(filename, lines, error): "src/nvim/event/time.h", "src/nvim/event/wstream.h", "src/nvim/ex_cmds.h", - "src/nvim/ex_cmds2.h", "src/nvim/ex_cmds_defs.h", "src/nvim/ex_docmd.h", - "src/nvim/ex_eval.h", "src/nvim/ex_eval_defs.h", "src/nvim/ex_getln.h", - "src/nvim/ex_session.h", "src/nvim/extmark.h", "src/nvim/extmark_defs.h", "src/nvim/file_search.h", @@ -982,7 +974,6 @@ def CheckIncludes(filename, lines, error): "src/nvim/grid.h", "src/nvim/grid_defs.h", "src/nvim/hashtab.h", - "src/nvim/help.h", "src/nvim/highlight.h", "src/nvim/highlight_defs.h", "src/nvim/highlight_group.h", @@ -994,13 +985,7 @@ def CheckIncludes(filename, lines, error): "src/nvim/keycodes.h", "src/nvim/linematch.h", "src/nvim/log.h", - "src/nvim/lua/base64.h", "src/nvim/lua/executor.h", - "src/nvim/lua/secure.h", - "src/nvim/lua/spell.h", - "src/nvim/lua/stdlib.h", - "src/nvim/lua/treesitter.h", - "src/nvim/lua/xdiff.h", "src/nvim/macros.h", "src/nvim/main.h", "src/nvim/map.h", @@ -1012,7 +997,6 @@ def CheckIncludes(filename, lines, error): "src/nvim/match.h", "src/nvim/mbyte.h", "src/nvim/mbyte_defs.h", - "src/nvim/memfile.h", "src/nvim/memfile_defs.h", "src/nvim/memline.h", "src/nvim/memory.h", @@ -1023,16 +1007,12 @@ def CheckIncludes(filename, lines, error): "src/nvim/msgpack_rpc/channel.h", "src/nvim/msgpack_rpc/channel_defs.h", "src/nvim/msgpack_rpc/helpers.h", - "src/nvim/msgpack_rpc/server.h", "src/nvim/msgpack_rpc/unpacker.h", "src/nvim/normal.h", - "src/nvim/nvim/extmark.h", "src/nvim/ops.h", "src/nvim/option.h", "src/nvim/option_defs.h", "src/nvim/option_vars.h", - "src/nvim/optionstr.h", - "src/nvim/os/dl.h", "src/nvim/os/fileio.h", "src/nvim/os/fs.h", "src/nvim/os/input.h", @@ -1041,9 +1021,6 @@ def CheckIncludes(filename, lines, error): "src/nvim/os/pty_conpty_win.h", "src/nvim/os/pty_process_unix.h", "src/nvim/os/pty_process_win.h", - "src/nvim/os/shell.h", - "src/nvim/os/time.h", - "src/nvim/os/tty.h", "src/nvim/path.h", "src/nvim/plines.h", "src/nvim/popupmenu.h", @@ -1053,20 +1030,13 @@ def CheckIncludes(filename, lines, error): "src/nvim/regexp_defs.h", "src/nvim/runtime.h", "src/nvim/search.h", - "src/nvim/sha256.h", - "src/nvim/shada.h", "src/nvim/sign.h", - "src/nvim/sign_defs.h", "src/nvim/spell.h", "src/nvim/spell_defs.h", - "src/nvim/spellfile.h", - "src/nvim/state.h", "src/nvim/statusline.h", "src/nvim/statusline_defs.h", "src/nvim/strings.h", "src/nvim/syntax.h", - "src/nvim/tag.h", - "src/nvim/terminal.h", "src/nvim/testing.h", "src/nvim/textformat.h", "src/nvim/textobject.h", -- cgit From 38a20dd89f91c45ec8589bf1c50d50732882d38a Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Mon, 27 Nov 2023 20:58:37 +0800 Subject: build(IWYU): replace most private mappings with pragmas (#26247) --- src/clint.py | 1 - 1 file changed, 1 deletion(-) (limited to 'src/clint.py') diff --git a/src/clint.py b/src/clint.py index d853428cd0..13c2978cf4 100755 --- a/src/clint.py +++ b/src/clint.py @@ -1017,7 +1017,6 @@ def CheckIncludes(filename, lines, error): "src/nvim/os/fs.h", "src/nvim/os/input.h", "src/nvim/os/lang.h", - "src/nvim/os/os.h", "src/nvim/os/pty_conpty_win.h", "src/nvim/os/pty_process_unix.h", "src/nvim/os/pty_process_win.h", -- cgit From f4aedbae4cb1f206f5b7c6142697b71dd473059b Mon Sep 17 00:00:00 2001 From: dundargoc Date: Mon, 27 Nov 2023 18:39:38 +0100 Subject: build(IWYU): fix includes for undo_defs.h --- src/clint.py | 1 - 1 file changed, 1 deletion(-) (limited to 'src/clint.py') diff --git a/src/clint.py b/src/clint.py index 13c2978cf4..7a26f71064 100755 --- a/src/clint.py +++ b/src/clint.py @@ -1046,7 +1046,6 @@ def CheckIncludes(filename, lines, error): "src/nvim/ui_client.h", "src/nvim/ui_compositor.h", "src/nvim/undo.h", - "src/nvim/undo_defs.h", "src/nvim/usercmd.h", "src/nvim/version.h", "src/nvim/vim.h", -- cgit From ab7c0e9904610a1554af1c34a42bcaa25c847c15 Mon Sep 17 00:00:00 2001 From: dundargoc Date: Mon, 27 Nov 2023 19:47:06 +0100 Subject: refactor: create runtime_defs.h --- src/clint.py | 1 - 1 file changed, 1 deletion(-) (limited to 'src/clint.py') diff --git a/src/clint.py b/src/clint.py index 7a26f71064..5e482abca9 100755 --- a/src/clint.py +++ b/src/clint.py @@ -1027,7 +1027,6 @@ def CheckIncludes(filename, lines, error): "src/nvim/quickfix.h", "src/nvim/regexp.h", "src/nvim/regexp_defs.h", - "src/nvim/runtime.h", "src/nvim/search.h", "src/nvim/sign.h", "src/nvim/spell.h", -- cgit From f9231603c40301ef48ab2cc50e62c9e430b7edf3 Mon Sep 17 00:00:00 2001 From: dundargoc Date: Mon, 27 Nov 2023 20:22:17 +0100 Subject: refactor: fix includes for iconv.h --- src/clint.py | 1 - 1 file changed, 1 deletion(-) (limited to 'src/clint.py') diff --git a/src/clint.py b/src/clint.py index 5e482abca9..3440e57b59 100755 --- a/src/clint.py +++ b/src/clint.py @@ -977,7 +977,6 @@ def CheckIncludes(filename, lines, error): "src/nvim/highlight.h", "src/nvim/highlight_defs.h", "src/nvim/highlight_group.h", - "src/nvim/iconv.h", "src/nvim/indent.h", "src/nvim/indent_c.h", "src/nvim/input.h", -- cgit From e3f735ef101d670555f44226614a5c3557053b1f Mon Sep 17 00:00:00 2001 From: dundargoc Date: Mon, 27 Nov 2023 20:13:32 +0100 Subject: refactor: fix includes for api/autocmd.h --- src/clint.py | 1 - 1 file changed, 1 deletion(-) (limited to 'src/clint.py') diff --git a/src/clint.py b/src/clint.py index 3440e57b59..c6d7d1e8a3 100755 --- a/src/clint.py +++ b/src/clint.py @@ -897,7 +897,6 @@ def CheckIncludes(filename, lines, error): # These should be synced with the ignored headers in the `iwyu` target in # the Makefile. check_includes_ignore = [ - "src/nvim/api/autocmd.h", "src/nvim/api/buffer.h", "src/nvim/api/command.h", "src/nvim/api/extmark.h", -- cgit From 718053b7a97c4e2fbaa6077d3c9f4dc7012c8aad Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 28 Nov 2023 07:47:36 +0800 Subject: refactor: fix runtime_defs.h (#26259) --- src/clint.py | 40 ---------------------------------------- 1 file changed, 40 deletions(-) (limited to 'src/clint.py') diff --git a/src/clint.py b/src/clint.py index c6d7d1e8a3..c9e6ca9973 100755 --- a/src/clint.py +++ b/src/clint.py @@ -897,20 +897,12 @@ def CheckIncludes(filename, lines, error): # These should be synced with the ignored headers in the `iwyu` target in # the Makefile. check_includes_ignore = [ - "src/nvim/api/buffer.h", - "src/nvim/api/command.h", "src/nvim/api/extmark.h", - "src/nvim/api/options.h", "src/nvim/api/private/defs.h", "src/nvim/api/private/dispatch.h", "src/nvim/api/private/helpers.h", "src/nvim/api/private/validate.h", "src/nvim/api/ui.h", - "src/nvim/api/vim.h", - "src/nvim/api/vimscript.h", - "src/nvim/api/win_config.h", - "src/nvim/api/window.h", - "src/nvim/arglist.h", "src/nvim/ascii.h", "src/nvim/assert.h", "src/nvim/autocmd.h", @@ -918,28 +910,19 @@ def CheckIncludes(filename, lines, error): "src/nvim/buffer.h", "src/nvim/buffer_defs.h", "src/nvim/buffer_updates.h", - "src/nvim/bufwrite.h", - "src/nvim/change.h", "src/nvim/channel.h", "src/nvim/charset.h", "src/nvim/cmdexpand.h", - "src/nvim/cmdexpand_defs.h", "src/nvim/cmdhist.h", "src/nvim/context.h", - "src/nvim/cursor.h", "src/nvim/decoration.h", "src/nvim/decoration_defs.h", "src/nvim/decoration_provider.h", "src/nvim/diff.h", - "src/nvim/digraph.h", "src/nvim/drawline.h", "src/nvim/drawscreen.h", - "src/nvim/edit.h", "src/nvim/eval.h", - "src/nvim/eval/buffer.h", - "src/nvim/eval/decode.h", "src/nvim/eval/encode.h", - "src/nvim/eval/funcs.h", "src/nvim/eval/typval.h", "src/nvim/eval/typval_defs.h", "src/nvim/eval/typval_encode.h", @@ -959,46 +942,34 @@ def CheckIncludes(filename, lines, error): "src/nvim/ex_cmds.h", "src/nvim/ex_cmds_defs.h", "src/nvim/ex_docmd.h", - "src/nvim/ex_eval_defs.h", "src/nvim/ex_getln.h", "src/nvim/extmark.h", "src/nvim/extmark_defs.h", "src/nvim/file_search.h", "src/nvim/fileio.h", "src/nvim/fold.h", - "src/nvim/fold_defs.h", "src/nvim/garray.h", "src/nvim/getchar.h", "src/nvim/globals.h", "src/nvim/grid.h", - "src/nvim/grid_defs.h", - "src/nvim/hashtab.h", "src/nvim/highlight.h", "src/nvim/highlight_defs.h", "src/nvim/highlight_group.h", - "src/nvim/indent.h", - "src/nvim/indent_c.h", "src/nvim/input.h", "src/nvim/insexpand.h", "src/nvim/keycodes.h", - "src/nvim/linematch.h", "src/nvim/log.h", "src/nvim/lua/executor.h", "src/nvim/macros.h", "src/nvim/main.h", "src/nvim/map.h", - "src/nvim/mapping.h", - "src/nvim/mapping_defs.h", "src/nvim/mark.h", "src/nvim/mark_defs.h", "src/nvim/marktree.h", - "src/nvim/match.h", "src/nvim/mbyte.h", "src/nvim/mbyte_defs.h", "src/nvim/memfile_defs.h", - "src/nvim/memline.h", "src/nvim/memory.h", - "src/nvim/menu.h", "src/nvim/message.h", "src/nvim/mouse.h", "src/nvim/move.h", @@ -1009,31 +980,22 @@ def CheckIncludes(filename, lines, error): "src/nvim/normal.h", "src/nvim/ops.h", "src/nvim/option.h", - "src/nvim/option_defs.h", "src/nvim/option_vars.h", "src/nvim/os/fileio.h", - "src/nvim/os/fs.h", "src/nvim/os/input.h", - "src/nvim/os/lang.h", "src/nvim/os/pty_conpty_win.h", "src/nvim/os/pty_process_unix.h", "src/nvim/os/pty_process_win.h", "src/nvim/path.h", "src/nvim/plines.h", "src/nvim/popupmenu.h", - "src/nvim/profile.h", - "src/nvim/quickfix.h", - "src/nvim/regexp.h", - "src/nvim/regexp_defs.h", "src/nvim/search.h", - "src/nvim/sign.h", "src/nvim/spell.h", "src/nvim/spell_defs.h", "src/nvim/statusline.h", "src/nvim/statusline_defs.h", "src/nvim/strings.h", "src/nvim/syntax.h", - "src/nvim/testing.h", "src/nvim/textformat.h", "src/nvim/textobject.h", "src/nvim/tui/input.h", @@ -1042,8 +1004,6 @@ def CheckIncludes(filename, lines, error): "src/nvim/ui.h", "src/nvim/ui_client.h", "src/nvim/ui_compositor.h", - "src/nvim/undo.h", - "src/nvim/usercmd.h", "src/nvim/version.h", "src/nvim/vim.h", "src/nvim/viml/parser/expressions.h", -- cgit From 1a8f60c7d2699826b51f23b040b83b1d96a14930 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 28 Nov 2023 10:47:22 +0800 Subject: refactor: move hashtab types to hashtab_defs.h (#26262) --- src/clint.py | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/clint.py') diff --git a/src/clint.py b/src/clint.py index c9e6ca9973..812464b753 100755 --- a/src/clint.py +++ b/src/clint.py @@ -927,7 +927,6 @@ def CheckIncludes(filename, lines, error): "src/nvim/eval/typval_defs.h", "src/nvim/eval/typval_encode.h", "src/nvim/eval/userfunc.h", - "src/nvim/eval/vars.h", "src/nvim/eval/window.h", "src/nvim/event/libuv_process.h", "src/nvim/event/loop.h", @@ -991,7 +990,6 @@ def CheckIncludes(filename, lines, error): "src/nvim/popupmenu.h", "src/nvim/search.h", "src/nvim/spell.h", - "src/nvim/spell_defs.h", "src/nvim/statusline.h", "src/nvim/statusline_defs.h", "src/nvim/strings.h", -- cgit From 71e954ad303eec25b67541f3a99392446f6de8b3 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 28 Nov 2023 17:01:27 +0800 Subject: refactor(IWYU): fix includes for ugrid.h (#26267) --- src/clint.py | 1 - 1 file changed, 1 deletion(-) (limited to 'src/clint.py') diff --git a/src/clint.py b/src/clint.py index 812464b753..9daa1ad21f 100755 --- a/src/clint.py +++ b/src/clint.py @@ -998,7 +998,6 @@ def CheckIncludes(filename, lines, error): "src/nvim/textobject.h", "src/nvim/tui/input.h", "src/nvim/tui/tui.h", - "src/nvim/ugrid.h", "src/nvim/ui.h", "src/nvim/ui_client.h", "src/nvim/ui_compositor.h", -- cgit From 79b6ff28ad1204fbb4199b9092f5c578d88cb28e Mon Sep 17 00:00:00 2001 From: dundargoc Date: Tue, 28 Nov 2023 20:31:00 +0100 Subject: refactor: fix headers with IWYU --- src/clint.py | 31 ++++++++++++------------------- 1 file changed, 12 insertions(+), 19 deletions(-) (limited to 'src/clint.py') diff --git a/src/clint.py b/src/clint.py index 9daa1ad21f..91fee4917a 100755 --- a/src/clint.py +++ b/src/clint.py @@ -903,8 +903,8 @@ def CheckIncludes(filename, lines, error): "src/nvim/api/private/helpers.h", "src/nvim/api/private/validate.h", "src/nvim/api/ui.h", - "src/nvim/ascii.h", - "src/nvim/assert.h", + "src/nvim/ascii_defs.h", + "src/nvim/assert_defs.h", "src/nvim/autocmd.h", "src/nvim/autocmd_defs.h", "src/nvim/buffer.h", @@ -916,7 +916,6 @@ def CheckIncludes(filename, lines, error): "src/nvim/cmdhist.h", "src/nvim/context.h", "src/nvim/decoration.h", - "src/nvim/decoration_defs.h", "src/nvim/decoration_provider.h", "src/nvim/diff.h", "src/nvim/drawline.h", @@ -943,7 +942,6 @@ def CheckIncludes(filename, lines, error): "src/nvim/ex_docmd.h", "src/nvim/ex_getln.h", "src/nvim/extmark.h", - "src/nvim/extmark_defs.h", "src/nvim/file_search.h", "src/nvim/fileio.h", "src/nvim/fold.h", @@ -952,23 +950,15 @@ def CheckIncludes(filename, lines, error): "src/nvim/globals.h", "src/nvim/grid.h", "src/nvim/highlight.h", - "src/nvim/highlight_defs.h", "src/nvim/highlight_group.h", "src/nvim/input.h", "src/nvim/insexpand.h", "src/nvim/keycodes.h", "src/nvim/log.h", "src/nvim/lua/executor.h", - "src/nvim/macros.h", "src/nvim/main.h", - "src/nvim/map.h", "src/nvim/mark.h", - "src/nvim/mark_defs.h", "src/nvim/marktree.h", - "src/nvim/mbyte.h", - "src/nvim/mbyte_defs.h", - "src/nvim/memfile_defs.h", - "src/nvim/memory.h", "src/nvim/message.h", "src/nvim/mouse.h", "src/nvim/move.h", @@ -976,10 +966,8 @@ def CheckIncludes(filename, lines, error): "src/nvim/msgpack_rpc/channel_defs.h", "src/nvim/msgpack_rpc/helpers.h", "src/nvim/msgpack_rpc/unpacker.h", - "src/nvim/normal.h", "src/nvim/ops.h", "src/nvim/option.h", - "src/nvim/option_vars.h", "src/nvim/os/fileio.h", "src/nvim/os/input.h", "src/nvim/os/pty_conpty_win.h", @@ -990,9 +978,6 @@ def CheckIncludes(filename, lines, error): "src/nvim/popupmenu.h", "src/nvim/search.h", "src/nvim/spell.h", - "src/nvim/statusline.h", - "src/nvim/statusline_defs.h", - "src/nvim/strings.h", "src/nvim/syntax.h", "src/nvim/textformat.h", "src/nvim/textobject.h", @@ -1001,13 +986,19 @@ def CheckIncludes(filename, lines, error): "src/nvim/ui.h", "src/nvim/ui_client.h", "src/nvim/ui_compositor.h", - "src/nvim/version.h", - "src/nvim/vim.h", + "src/nvim/vim_defs.h", "src/nvim/viml/parser/expressions.h", "src/nvim/viml/parser/parser.h", "src/nvim/window.h", ] + skip_headers = [ + "klib/kvec.h", + "klib/klist.h", + "auto/config.h", + "nvim/func_attr.h" + ] + for i in check_includes_ignore: if filename.endswith(i): return @@ -1016,6 +1007,8 @@ def CheckIncludes(filename, lines, error): matched = Match(r'#\s*include\s*"([^"]*)"', line) if matched: name = matched.group(1) + if name in skip_headers: + continue if (not name.endswith('.h.generated.h') and not name.endswith('_defs.h') and not name.endswith('/defs.h')): -- cgit From 64b53b71ba5d804b2c8cf186be68931b2621f53c Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Wed, 29 Nov 2023 12:10:42 +0800 Subject: refactor(IWYU): create normal_defs.h (#26293) --- src/clint.py | 1 - 1 file changed, 1 deletion(-) (limited to 'src/clint.py') diff --git a/src/clint.py b/src/clint.py index 91fee4917a..ef2ac57a87 100755 --- a/src/clint.py +++ b/src/clint.py @@ -979,7 +979,6 @@ def CheckIncludes(filename, lines, error): "src/nvim/search.h", "src/nvim/spell.h", "src/nvim/syntax.h", - "src/nvim/textformat.h", "src/nvim/textobject.h", "src/nvim/tui/input.h", "src/nvim/tui/tui.h", -- cgit From a6cba103cebce535279db197f9efeb34e9d1171f Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Wed, 29 Nov 2023 20:32:40 +0800 Subject: refactor: move some constants out of vim_defs.h (#26298) --- src/clint.py | 9 --------- 1 file changed, 9 deletions(-) (limited to 'src/clint.py') diff --git a/src/clint.py b/src/clint.py index ef2ac57a87..e730b9276b 100755 --- a/src/clint.py +++ b/src/clint.py @@ -898,7 +898,6 @@ def CheckIncludes(filename, lines, error): # the Makefile. check_includes_ignore = [ "src/nvim/api/extmark.h", - "src/nvim/api/private/defs.h", "src/nvim/api/private/dispatch.h", "src/nvim/api/private/helpers.h", "src/nvim/api/private/validate.h", @@ -909,14 +908,11 @@ def CheckIncludes(filename, lines, error): "src/nvim/autocmd_defs.h", "src/nvim/buffer.h", "src/nvim/buffer_defs.h", - "src/nvim/buffer_updates.h", "src/nvim/channel.h", "src/nvim/charset.h", "src/nvim/cmdexpand.h", "src/nvim/cmdhist.h", - "src/nvim/context.h", "src/nvim/decoration.h", - "src/nvim/decoration_provider.h", "src/nvim/diff.h", "src/nvim/drawline.h", "src/nvim/drawscreen.h", @@ -924,7 +920,6 @@ def CheckIncludes(filename, lines, error): "src/nvim/eval/encode.h", "src/nvim/eval/typval.h", "src/nvim/eval/typval_defs.h", - "src/nvim/eval/typval_encode.h", "src/nvim/eval/userfunc.h", "src/nvim/eval/window.h", "src/nvim/event/libuv_process.h", @@ -940,7 +935,6 @@ def CheckIncludes(filename, lines, error): "src/nvim/ex_cmds.h", "src/nvim/ex_cmds_defs.h", "src/nvim/ex_docmd.h", - "src/nvim/ex_getln.h", "src/nvim/extmark.h", "src/nvim/file_search.h", "src/nvim/fileio.h", @@ -958,15 +952,12 @@ def CheckIncludes(filename, lines, error): "src/nvim/lua/executor.h", "src/nvim/main.h", "src/nvim/mark.h", - "src/nvim/marktree.h", - "src/nvim/message.h", "src/nvim/mouse.h", "src/nvim/move.h", "src/nvim/msgpack_rpc/channel.h", "src/nvim/msgpack_rpc/channel_defs.h", "src/nvim/msgpack_rpc/helpers.h", "src/nvim/msgpack_rpc/unpacker.h", - "src/nvim/ops.h", "src/nvim/option.h", "src/nvim/os/fileio.h", "src/nvim/os/input.h", -- cgit From 86cc791debba09c8ed1aa0d863be844108866a38 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Wed, 29 Nov 2023 23:10:21 +0800 Subject: refactor: move function macros out of vim_defs.h (#26300) --- src/clint.py | 1 - 1 file changed, 1 deletion(-) (limited to 'src/clint.py') diff --git a/src/clint.py b/src/clint.py index e730b9276b..1f588322f3 100755 --- a/src/clint.py +++ b/src/clint.py @@ -976,7 +976,6 @@ def CheckIncludes(filename, lines, error): "src/nvim/ui.h", "src/nvim/ui_client.h", "src/nvim/ui_compositor.h", - "src/nvim/vim_defs.h", "src/nvim/viml/parser/expressions.h", "src/nvim/viml/parser/parser.h", "src/nvim/window.h", -- cgit