From ea611c7122470af0e03f4b0a5ae99c0878da2712 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Sat, 3 Sep 2022 12:00:00 +0200 Subject: ci(clint): remove "Inner expression indentation should be 4" rule (#20047) It completely breaks down in shada.c and is generally useless. --- src/clint.py | 7 ------- 1 file changed, 7 deletions(-) (limited to 'src/clint.py') diff --git a/src/clint.py b/src/clint.py index 28f6031a57..0556f53372 100755 --- a/src/clint.py +++ b/src/clint.py @@ -1941,13 +1941,6 @@ def CheckExpressionAlignment(filename, clean_lines, linenum, error, startpos=0): error(filename, linenum, 'whitespace/indent', 2, 'End of the inner expression should have ' 'the same indent as start') - else: - if (pos != depth_line_starts[depth][0] + 4 - and not (depth_line_starts[depth][1] == '{' - and pos == depth_line_starts[depth][0] + 2)): - if depth not in ignore_error_levels: - error(filename, linenum, 'whitespace/indent', 2, - 'Inner expression indentation should be 4') else: if (pos != level_starts[depth][0] + 1 + (level_starts[depth][2] == '{')): -- cgit From bd4eca11464dc65d40a58444aa67bd0f3553ae0c Mon Sep 17 00:00:00 2001 From: Famiu Haque Date: Wed, 14 Sep 2022 11:01:39 +0600 Subject: refactor: move definitions from `typval.h` to `typval_defs.h` (#20194) Taken from #20187. --- 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 0556f53372..c4ddbf706e 100755 --- a/src/clint.py +++ b/src/clint.py @@ -2700,7 +2700,7 @@ def CheckLanguage(filename, clean_lines, linenum, error): if match: error(filename, linenum, 'runtime/printf', 4, 'Use xstrlcat or snprintf instead of %s' % match.group(1)) - if not Search(r'eval/typval\.[ch]$', filename): + if not Search(r'eval/typval\.[ch]$|eval/typval_defs\.h$', filename): match = Search(r'(?:\.|->)' r'(?:lv_(?:first|last|refcount|len|watch|idx(?:_item)?' r'|copylist|lock)' -- cgit From df646572c53f55268a5dbb61628d7c3b302d5663 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Fri, 30 Sep 2022 09:53:52 +0200 Subject: docs: fix typos (#20394) Co-authored-by: Raphael Co-authored-by: smjonas Co-authored-by: zeertzjq --- 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 c4ddbf706e..1a355e0218 100755 --- a/src/clint.py +++ b/src/clint.py @@ -202,7 +202,7 @@ _ERROR_CATEGORIES = [ 'whitespace/cast', ] -# The default state of the category filter. This is overrided by the --filter= +# The default state of the category filter. This is overridden by the --filter= # 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. -- cgit From 09dffb9db7d16496e55e86f78ab60241533d86f6 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sun, 9 Oct 2022 08:21:52 -0400 Subject: docs: various #12823 - increase python line-length limit from 88 => 100. - gen_help_html: fix bug in "tag" case (tbl_count => tbl_contains) ref #15632 fix #18215 fix #18479 fix #20527 fix #20532 Co-authored-by: Ben Weedon --- src/clint.py | 35 ++++++++--------------------------- 1 file changed, 8 insertions(+), 27 deletions(-) (limited to 'src/clint.py') diff --git a/src/clint.py b/src/clint.py index 1a355e0218..4829a50887 100755 --- a/src/clint.py +++ b/src/clint.py @@ -1,5 +1,7 @@ #!/usr/bin/env python3 # +# https://github.com/cpplint/cpplint +# # Copyright (c) 2009 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -29,15 +31,9 @@ """Lints C files in the Neovim source tree. -The goal of this script is to identify places in the code that *may* -be in non-compliance with Neovim style. It does not attempt to fix -up these problems -- the point is to educate. It does also not -attempt to find all problems, or to ensure that everything it does -find is legitimately a problem. - -In particular, we can get very confused by /* and // inside strings! -We do a small hack, which is to ignore //'s with "'s after them on the -same line, but it is far from perfect (in either direction). +This can get very confused by /* and // inside strings! We do a small hack, +which is to ignore //'s with "'s after them on the same line, but it is far +from perfect (in either direction). """ @@ -61,25 +57,10 @@ Syntax: clint.py [--verbose=#] [--output=vs7] [--filter=-x,+y,...] [file] ... The style guidelines this tries to follow are those in - http://neovim.io/develop/style-guide.xml - - Note: This is Google's cpplint.py modified for use with the Neovim project, - which follows the Google C++ coding convention except with the following - modifications: - - * Function names are lower_case. - * Struct and enum names that are not typedef-ed are struct lower_case and - enum lower_case. - * The opening brace for functions appear on the next line. - * All control structures must always use braces. - - Neovim is a C project. As a result, for .c and .h files, the following rules - are suppressed: + https://neovim.io/doc/user/dev_style.html#dev-style - * [whitespace/braces] { should almost always be at the end of the previous - line - * [build/include] Include the directory when naming .h files - * [runtime/int] Use int16_t/int64_t/etc, rather than the C type. + Note: This is Google's https://github.com/cpplint/cpplint modified for use + with the Neovim project. Every problem is given a confidence score from 1-5, with 5 meaning we are certain of the problem, and 1 meaning it could be a legitimate construct. -- cgit