diff options
| author | dundargoc <gocdundar@gmail.com> | 2023-10-20 15:10:33 +0200 |
|---|---|---|
| committer | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2023-10-23 20:06:21 +0200 |
| commit | 5f03a1eaabfc8de2b3a9c666fcd604763f41e152 (patch) | |
| tree | 2a4e38bf7ac44749bd876d5e4d822f8ac604c2ae /src/nvim/eval | |
| parent | e606604322815abd3dc91a5595a0aa976a9aded7 (diff) | |
| download | rneovim-5f03a1eaabfc8de2b3a9c666fcd604763f41e152.tar.gz rneovim-5f03a1eaabfc8de2b3a9c666fcd604763f41e152.tar.bz2 rneovim-5f03a1eaabfc8de2b3a9c666fcd604763f41e152.zip | |
build(lint): remove unnecessary clint.py rules
Uncrustify is the source of truth where possible.
Remove any redundant checks from clint.py.
Diffstat (limited to 'src/nvim/eval')
| -rw-r--r-- | src/nvim/eval/funcs.c | 14 | ||||
| -rw-r--r-- | src/nvim/eval/typval.c | 26 | ||||
| -rw-r--r-- | src/nvim/eval/typval.h | 4 |
3 files changed, 22 insertions, 22 deletions
diff --git a/src/nvim/eval/funcs.c b/src/nvim/eval/funcs.c index 8e5bf68be1..4759b4ebe3 100644 --- a/src/nvim/eval/funcs.c +++ b/src/nvim/eval/funcs.c @@ -2502,7 +2502,7 @@ static void f_getcwd(typval_T *argvars, typval_T *rettv, EvalFuncData fptr) [kCdScopeTabpage] = 0, // Number of tab to look at. }; - char *cwd = NULL; // Current working directory to print + char *cwd = NULL; // Current working directory to print char *from = NULL; // The original string to copy tabpage_T *tp = curtab; // The tabpage to look at. @@ -3281,7 +3281,7 @@ static void f_haslocaldir(typval_T *argvars, typval_T *rettv, EvalFuncData fptr) [kCdScopeTabpage] = 0, // Number of tab to look at. }; - tabpage_T *tp = curtab; // The tabpage to look at. + tabpage_T *tp = curtab; // The tabpage to look at. win_T *win = curwin; // The window to look at. rettv->v_type = VAR_NUMBER; @@ -5258,7 +5258,7 @@ static void f_prompt_setinterrupt(typval_T *argvars, typval_T *rettv, EvalFuncDa } callback_free(&buf->b_prompt_interrupt); - buf->b_prompt_interrupt= interrupt_callback; + buf->b_prompt_interrupt = interrupt_callback; } /// "prompt_getprompt({buffer})" function @@ -5589,9 +5589,9 @@ static void read_file_or_blob(typval_T *argvars, typval_T *rettv, bool always_bl char buf[(IOSIZE/256) * 256]; // rounded to avoid odd + 1 int io_size = sizeof(buf); char *prev = NULL; // previously read bytes, if any - ptrdiff_t prevlen = 0; // length of data in prev + ptrdiff_t prevlen = 0; // length of data in prev ptrdiff_t prevsize = 0; // size of prev buffer - int64_t maxline = MAXLNUM; + int64_t maxline = MAXLNUM; off_T offset = 0; off_T size = -1; @@ -5651,7 +5651,7 @@ static void read_file_or_blob(typval_T *argvars, typval_T *rettv, bool always_bl p < buf + readlen || (readlen <= 0 && (prevlen > 0 || binary)); p++) { if (readlen <= 0 || *p == '\n') { - char *s = NULL; + char *s = NULL; size_t len = (size_t)(p - start); // Finished a line. Remove CRs before NL. @@ -5754,7 +5754,7 @@ static void read_file_or_blob(typval_T *argvars, typval_T *rettv, bool always_bl prevsize = p - start; } else { ptrdiff_t grow50pc = (prevsize * 3) / 2; - ptrdiff_t growmin = (p - start) * 2 + prevlen; + ptrdiff_t growmin = (p - start) * 2 + prevlen; prevsize = grow50pc > growmin ? grow50pc : growmin; } prev = xrealloc(prev, (size_t)prevsize); diff --git a/src/nvim/eval/typval.c b/src/nvim/eval/typval.c index 9fca4adcf7..badb948584 100644 --- a/src/nvim/eval/typval.c +++ b/src/nvim/eval/typval.c @@ -3964,13 +3964,13 @@ bool tv_check_str_or_nr(const typval_T *const tv) #define FUNC_ERROR "E703: Using a Funcref as a Number" static const char *const num_errors[] = { - [VAR_PARTIAL]= N_(FUNC_ERROR), - [VAR_FUNC]= N_(FUNC_ERROR), - [VAR_LIST]= N_("E745: Using a List as a Number"), - [VAR_DICT]= N_("E728: Using a Dictionary as a Number"), - [VAR_FLOAT]= N_("E805: Using a Float as a Number"), - [VAR_BLOB]= N_("E974: Using a Blob as a Number"), - [VAR_UNKNOWN]= N_("E685: using an invalid value as a Number"), + [VAR_PARTIAL] = N_(FUNC_ERROR), + [VAR_FUNC] = N_(FUNC_ERROR), + [VAR_LIST] = N_("E745: Using a List as a Number"), + [VAR_DICT] = N_("E728: Using a Dictionary as a Number"), + [VAR_FLOAT] = N_("E805: Using a Float as a Number"), + [VAR_BLOB] = N_("E974: Using a Blob as a Number"), + [VAR_UNKNOWN] = N_("E685: using an invalid value as a Number"), }; #undef FUNC_ERROR @@ -4009,12 +4009,12 @@ bool tv_check_num(const typval_T *const tv) #define FUNC_ERROR "E729: Using a Funcref as a String" static const char *const str_errors[] = { - [VAR_PARTIAL]= N_(FUNC_ERROR), - [VAR_FUNC]= N_(FUNC_ERROR), - [VAR_LIST]= N_("E730: Using a List as a String"), - [VAR_DICT]= N_("E731: Using a Dictionary as a String"), - [VAR_BLOB]= N_("E976: Using a Blob as a String"), - [VAR_UNKNOWN]= e_using_invalid_value_as_string, + [VAR_PARTIAL] = N_(FUNC_ERROR), + [VAR_FUNC] = N_(FUNC_ERROR), + [VAR_LIST] = N_("E730: Using a List as a String"), + [VAR_DICT] = N_("E731: Using a Dictionary as a String"), + [VAR_BLOB] = N_("E976: Using a Blob as a String"), + [VAR_UNKNOWN] = e_using_invalid_value_as_string, }; #undef FUNC_ERROR diff --git a/src/nvim/eval/typval.h b/src/nvim/eval/typval.h index 0b42a473cf..7a168ba183 100644 --- a/src/nvim/eval/typval.h +++ b/src/nvim/eval/typval.h @@ -485,8 +485,8 @@ static inline bool tv_is_func(const typval_T tv) #ifdef UNIT_TESTING // Do not use enum constants, see commit message. -EXTERN const size_t kTVCstring INIT(= TV_CSTRING); -EXTERN const size_t kTVTranslate INIT(= TV_TRANSLATE); +EXTERN const size_t kTVCstring INIT( = TV_CSTRING); +EXTERN const size_t kTVTranslate INIT( = TV_TRANSLATE); #endif #ifdef INCLUDE_GENERATED_DECLARATIONS |