aboutsummaryrefslogtreecommitdiff
path: root/src/clint.py
Commit message (Collapse)AuthorAge
...
* py: flake8 fixesDaniel Hahler2019-07-29
|
* src/clint.py: flake8 fixes [ci skip] (#10631)Daniel Hahler2019-07-28
|
* doc [ci skip] #10383Justin M. Keyes2019-07-19
| | | | - test/README.md: document luassert `TableFormatLevel` - CONTRIBUTING.md: absorb parts of the old "Development tips" wiki page
* api: allow nvim_buf_attach from lua using callbacksBjörn Linse2019-06-04
|
* clint: remove CheckAltTokens()Justin M. Keyes2019-05-25
| | | | | | - These "alternative tokens" keywords are for C++, not C. - The check sometimes has false positives, e.g. `compl` is a variable name in edit.c
* Merge #9815 'vim-patch:8.1.1068: complete_info()'Justin M. Keyes2019-03-30
|
* clint: check env functionsJustin M. Keyes2019-02-28
|
* clint: add support for --stdin-filenameDaniel Hahler2018-10-05
|
* clint: use fileinput for stdinDaniel Hahler2018-10-05
| | | | | | | | | | | | | | | | | Fixes handing of "-" on Python 3: Traceback (most recent call last): File "…/Vcs/neovim/src/clint.py", line 3625, in <module> main() File "…/Vcs/neovim/src/clint.py", line 3618, in main ProcessFile(filename, _cpplint_state.verbose_level) File "…/Vcs/neovim/src/clint.py", line 3464, in ProcessFile 'replace').read().split('\n') File "/usr/lib/python3.7/codecs.py", line 701, in read return self.reader.read(size) File "/usr/lib/python3.7/codecs.py", line 500, in read data = self.bytebuffer + newdata TypeError: can't concat str to bytes
* clint: detect MAYBE and recommend TriStateJan Edmund Lazo2018-08-01
| | | | | Vim uses MAYBE for 3-value boolean with FALSE/TRUE/MAYBE. Use TriState type instead to restrict to 3 values, kFalse/kTrue/kNone.
* clint: use stdout for normal/expected output (#8700)Daniel Hahler2018-07-08
|
* clint: Make linter report line where it found opening braceZyX2017-12-23
|
* clint,eval: Make linter check for direct usage of list attributesZyX2017-12-12
|
* rpc: Don't delay notifications when request is pending (#6544)Björn Linse2017-10-29
| | | | | | | | | | | | | | | | | | | | | | With the old behavior, if a GUI makes a blocking request that requires user interaction (like nvim_input()), it would not get any screen updates. The client, not nvim, should decide how to handle notifications during a pending request. If an rplugin wants to avoid async calls while a sync call is busy, it likely wants to avoid processing async calls while another async call also is handled as well. This may break the expectation of some existing rplugins. For compatibility, remote/define.vim reimplements the old behavior. Clients can opt-out by specifying `sync=urgent`. - Legacy hosts should be updated to use `sync=urgent`. They could add a flag indicating which async methods are always safe to call and which must wait until the main loop returns. - New hosts can expose the full asyncness, they don't need to offer both behaviors. ref #6532 ref #1398 d83868fe9071af1b4866594eac12f7aa0fa71b53
* clint: allow starting brace after `enum`Justin M. Keyes2017-08-06
|
* kbtree: make warning free and delete deprecated macrosBjörn Linse2017-06-24
|
* clint: check FUNC_ATTR lines to have 2-space indentBjörn Linse2017-06-03
|
* Merge branch 'master' into luaviml'/luaZyX2017-04-08
|\
| * clint: Do not report zero errorsZyX2017-03-31
| |
| * eval: Split eval.c into smaller filesZyX2017-03-29
| |
* | clint: Allow omitting include guards in .c.h file and func_attr.h fileZyX2017-03-27
|/
* xstrlcat: Allow overlapped pointers. (#6017)Justin M. Keyes2017-01-31
| | | | | | | | | | memcpy is not equivalent to memmove (which is used by vim_strcat), this could cause subtle bugs if xstrlcat is used as a replacement for vim_strcat. But vim_strcat is inconsistent: in the `else` branch it uses strcpy, which doesn't allow overlap. Helped-by: oni-link <knil.ino@gmail.com> Helped-by: James McCoy <jamessan@jamessan.com> Helped-by: Nikolai Aleksandrovich Pavlov <kp-pav@yandex.ru>
* refactor: Remove strncpy/STRNCPY. (#6008)Justin M. Keyes2017-01-26
| | | | | | | | | | | | | | | Closes #731 References #851 Note: This does not remove some intentional legacy usages of strncpy. - memcpy isn't equivalent because it doesn't check the string length of `src`, and doesn't zero-out the remainder of `dst`. - xstrlcpy isn't equivalent because it doesn't zero-out the remainder of `dst`. Some Vim logic depends on that (e.g. ex_append which calls vim_strnsave). Helped-by: Douglas Schneider <ds3@ualberta.ca> Helped-by: oni-link <knil.ino@gmail.com> Helped-by: James McCoy <jamessan@jamessan.com>
* clint.py: Suggest xstrlcat instead of strcat.Justin M. Keyes2017-01-23
|
* src/clint.py: improve "Ignoring" messageDaniel Hahler2017-01-13
| | | | | | It was a bit confusing for me when seeing it myself the first time. [ci skip]
* Merge pull request #5863 from ZyX-I/more-clint-checksJames McCoy2017-01-10
|\ | | | | More clint brace checks
| * clint: Check for misplaced brace at function startZyX2017-01-03
| |
| * clint: Enable check for `{` positioned at the start of the line correctlyZyX2017-01-03
| | | | | | | | For some reason that was incorrectly hidden by “file is *not* \*.c or \*.h file” check.
* | Merge #5079 from ZyX-I/shada-save-current-posJustin M. Keyes2017-01-07
|\ \ | | | | | | shada: Save current cursor position before saving jumps
| * | clint: Add more exceptions to “space after a cast” ruleZyX2017-01-06
| |/ | | | | | | Python does not allow branching here, complaining that look-behind is not fixed-width.
* / clint: Allow including .c.h files multiple timesZyX2017-01-03
|/ | | | | Except when they are system just in case. There should be no .c.h system files though, but if there will be it is unlikely that they inherit the same convention.
* *: Fix linter errorsZyX2016-06-24
| | | | | | | | | Also adds one exception to linter rules: typedef struct { kvec_t(Object) stack; } EncodedData; is completely valid (from the style guide point of view) code.
* clint: Add rules that forbids spaces after a cast operatorZyX2016-06-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://neovim.io/develop/style-guide.xml#Horizontal_Whitespace Note that this errors out for e.g. if (has_mbyte) mb_copy_char((const char_u **)(&f), &t); \ (found in macros.h:151) or #define ECMD_SET_HELP 0x02 /* set b_help flag of (new) buffer before (found in ex_cmds.h:11) (note `(new) buffer`). I left this as-is because these pieces of code are already caught by another rule (braces near if and `/*`-style comments). Other false positives I found were: 1. `FUNC_ATTR_NONNULL_ARG(1) FUNC_ATTR_WARN_UNUSED_RESULT`: rejected by requiring type name to start with `[a-zA-Z_]` (this makes `1` not be incorrectly recognized as a type). 2. `#define FOO(var) (var)`: rejected by creating `cast_line`. 3. `(expr) * (expr)`: rejected by constructing regexp so that unary operators require no spaces after them. 4. `int f(void) FUNC_ATTR_PURE`: rejected by requiring line to start with a space. 5. `"." STR(NVIM_VERSION_PATCH) NVIM_VERSION_PRERELEASE`: not rejected, such thing should be rare and it would be easy to get rid of the false positive by e.g. breaking line. Struct literals like `(MyStruct) { 4, 2 }` are not checked: 1. I am not sure whether they are under this rule at all (this is not a cast). 2. It would be hard to get rid of false positives (like the example with `if` above, but now for *valid* `if() {}`s).
* clint: Reject indented preprocessor directivesZyX2016-06-11
| | | | | This is also not allowed by the style guide: https://neovim.io/develop/style-guide.xml#Preprocessor_Directives.
* clint: Do not allow aligning line continuation charactersZyX2016-06-11
| | | | | | | Rejected by https://neovim.io/develop/style-guide.xml#Horizontal_Whitespace. Note: what to do with “empty” lines is not described in the style guide, neither it is checked.
* reorgJustin M. Keyes2016-06-03