diff options
author | dundargoc <gocdundar@gmail.com> | 2023-12-24 13:26:28 +0100 |
---|---|---|
committer | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2023-12-24 20:50:44 +0100 |
commit | 675522af18f59918a64e6dbe5f0ba3b1d3b4eb65 (patch) | |
tree | 83257a09b6b35033de6554fdca6f6bfbe68e5f67 /src/clint.py | |
parent | ab2aad509d6e4fc57a6afe056275405ec6451671 (diff) | |
download | rneovim-675522af18f59918a64e6dbe5f0ba3b1d3b4eb65.tar.gz rneovim-675522af18f59918a64e6dbe5f0ba3b1d3b4eb65.tar.bz2 rneovim-675522af18f59918a64e6dbe5f0ba3b1d3b4eb65.zip |
build: remove clint checks and style text covered by uncrustify
Diffstat (limited to 'src/clint.py')
-rwxr-xr-x | src/clint.py | 53 |
1 files changed, 2 insertions, 51 deletions
diff --git a/src/clint.py b/src/clint.py index 2659abbb0e..7fcf840487 100755 --- a/src/clint.py +++ b/src/clint.py @@ -749,53 +749,6 @@ BRACES = { } -CLOSING_BRACES = {v: k for k, v in BRACES.items()} - - -def GetExprBracesPosition(clean_lines, linenum, pos): - """List positions of all kinds of braces - - If input points to ( or { or [ then function proceeds until finding the - position which closes it. - - Args: - clean_lines: A CleansedLines instance containing the file. - linenum: Current line number. - pos: A position on the line. - - Yields: - A tuple (linenum, pos, brace, depth) that points to each brace. - Additionally each new line (linenum, pos, 's', depth) is yielded, for each - line end (linenum, pos, 'e', depth) is yielded and at the very end it - yields (linenum, pos, None, None). - """ - depth = 0 - yielded_line_start = True - startpos = pos - while linenum < clean_lines.NumLines() - 1: - line = clean_lines.elided_with_space_strings[linenum] - if not line.startswith('#') or yielded_line_start: - # Ignore #ifdefs, but not if it is macros that are checked - for i, brace in enumerate(line[startpos:]): - pos = i + startpos - if brace != ' ' and not yielded_line_start: - yield (linenum, pos, 's', depth) - yielded_line_start = True - if brace in BRACES: - depth += 1 - yield (linenum, pos, brace, depth) - elif brace in CLOSING_BRACES: - yield (linenum, pos, brace, depth) - depth -= 1 - if depth == 0: - yield (linenum, pos, None, None) - return - yield (linenum, len(line) - 1, 'e', depth) - yielded_line_start = False - startpos = 0 - linenum += 1 - - def FindEndOfExpressionInLine(line, startpos, depth, startchar, endchar): """Find the position just after the matching endchar. @@ -1665,8 +1618,7 @@ def CheckSpacing(filename, clean_lines, linenum, error): line[commentpos - 1] not in string.whitespace) or (commentpos >= 2 and line[commentpos - 2] not in string.whitespace))): - error(filename, linenum, 'whitespace/comments', 2, - 'At least two spaces is best between code and comments') + return # There should always be a space between the // and the comment commentend = commentpos + 2 if commentend < len(line) and not line[commentend] == ' ': @@ -1777,8 +1729,7 @@ def CheckSpacing(filename, clean_lines, linenum, error): # There shouldn't be space around unary operators match = Search(r'(!\s|~\s|[\s]--[\s;]|[\s]\+\+[\s;])', line) if match: - error(filename, linenum, 'whitespace/operators', 4, - 'Extra space for operator %s' % match.group(1)) + return # For if/for/while/switch, the left and right parens should be # consistent about how many spaces are inside the parens, and |