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:
committed by
Christian Brabandt
parent
41cddfa177
commit
c2a9000bc1
@ -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
|
||||
|
||||
@ -704,6 +704,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
1363,
|
||||
/**/
|
||||
1362,
|
||||
/**/
|
||||
|
||||
Reference in New Issue
Block a user