diff options
author | Dundar Goc <gocdundar@gmail.com> | 2022-04-29 13:53:42 +0200 |
---|---|---|
committer | Dundar Goc <gocdundar@gmail.com> | 2022-04-29 14:13:06 +0200 |
commit | eef8de4df0247157e57f306062b1b86e01a41454 (patch) | |
tree | 949a172d60f0f58e04f99e18db038c435a909825 /src/nvim/tag.c | |
parent | 0b3ae64480ea28bb57783c2269a61f0a60ffc55e (diff) | |
download | rneovim-eef8de4df0247157e57f306062b1b86e01a41454.tar.gz rneovim-eef8de4df0247157e57f306062b1b86e01a41454.tar.bz2 rneovim-eef8de4df0247157e57f306062b1b86e01a41454.zip |
refactor(uncrustify): change rules to better align with the style guide
Add space around arithmetic operators '+' and '-'.
Remove space between back-to-back parentheses, i.e. ')(' vs. ') ('.
Remove space between '((' or '))' of control statements.
Add space between ')' and '{' of control statements.
Remove space between function name and '(' on function declaration.
Collapse empty blocks between '{' and '}'.
Remove newline at the end of the file.
Remove newline between 'enum' and '{'.
Remove newline between '}' and ')' in a function invocation.
Remove newline between '}' and 'while' of 'do' statement.
Diffstat (limited to 'src/nvim/tag.c')
-rw-r--r-- | src/nvim/tag.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/nvim/tag.c b/src/nvim/tag.c index 39c9aacad0..83eb3d1832 100644 --- a/src/nvim/tag.c +++ b/src/nvim/tag.c @@ -813,8 +813,7 @@ static void print_tag_list(int new_tag, int use_tagstack, int num_matches, char_ } else { for (p = tagp.command; *p && *p != '\r' && *p != '\n'; - p++) { - } + p++) {} command_end = p; } @@ -933,8 +932,7 @@ static int add_llist_tags(char_u *tag, int num_matches, char_u **matches) cmd_end = tagp.command_end; if (cmd_end == NULL) { for (p = tagp.command; - *p && *p != '\r' && *p != '\n'; p++) { - } + *p && *p != '\r' && *p != '\n'; p++) {} cmd_end = p; } @@ -1780,8 +1778,7 @@ line_read_in: if (STRNCMP(lbuf, "!_TAG_FILE_ENCODING\t", 20) == 0) { // Prepare to convert every line from the specified // encoding to 'encoding'. - for (p = lbuf + 20; *p > ' ' && *p < 127; p++) { - } + for (p = lbuf + 20; *p > ' ' && *p < 127; p++) {} *p = NUL; convert_setup(&vimconv, lbuf + 20, p_enc); } @@ -2614,15 +2611,13 @@ static int parse_match(char_u *lbuf, tagptrs_T *tagp) if (tagp->tagkind != NULL) { for (p = tagp->tagkind; *p && *p != '\t' && *p != '\r' && *p != '\n'; - MB_PTR_ADV(p)) { - } + MB_PTR_ADV(p)) {} tagp->tagkind_end = p; } if (tagp->user_data != NULL) { for (p = tagp->user_data; *p && *p != '\t' && *p != '\r' && *p != '\n'; - MB_PTR_ADV(p)) { - } + MB_PTR_ADV(p)) {} tagp->user_data_end = p; } } |