patch 9.1.1363: style: inconsistent indentation in various files

Problem:  style: inconsistent indentation in various files
Solution: fix style, updated codestyle test
          (Naruhiko Nishino)

closes: #17254

Signed-off-by: Naruhiko Nishino <naru123456789@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Naruhiko Nishino
2025-05-04 20:05:47 +02:00
committed by Christian Brabandt
parent 41cddfa177
commit c2a9000bc1
17 changed files with 1580 additions and 1556 deletions

View File

@ -163,5 +163,27 @@ def Test_help_files()
bwipe!
enddef
def Test_indent_of_source_files()
for fname in glob('../*.[ch]', 0, 1) + ['../xxd/xxd.c']
execute 'tabnew ' .. fname
for lnum in range(1, line('$'))
var name: string = synIDattr(synID(lnum, 1, 0), 'name')
if -1 == index(['cComment', 'cCommentStart'], name)
var line: string = getline(lnum)
var indent: string = matchstr(line, '^\s*')
var tailing: string = matchstr(line, '\s*$')
if !empty(indent)
if indent !~# '^\t* \{0,7\}$'
ReportError('testdir/' .. fname, lnum, 'invalid indent')
endif
endif
if !empty(tailing)
ReportError('testdir/' .. fname, lnum, 'tailing spaces')
endif
endif
endfor
close
endfor
enddef
" vim: shiftwidth=2 sts=2 expandtab nofoldenable

View File

@ -704,6 +704,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1363,
/**/
1362,
/**/