Skip to content

Commit

Permalink
patch 9.1.0606: tests: generated files may cause failure in test_code…
Browse files Browse the repository at this point in the history
…style

Problem:  tests: generated files may cause failure in test_codestyle
Solution: Exclude OLE-related generated files from style checks.
          (Ken Takata)

Some OLE-related auto-generated files may contain space errors:
https://ci.appveyor.com/project/chrisbra/vim-win32-installer/builds/50248542/job/w45ve9yd6qmmws8t#L11475
```
	From test_codestyle.vim:
	Found errors in Test_source_files():
	command line..script C:/projects/vim-win32-installer/vim/src/testdir/runtest.vim[607]..function RunTheTest[57]..Test_source_files[8]..<SNR>8_PerformCheck[11]..<SNR>8_ReportError line 2: ../dlldata.c line 2: trailing white space
	command line..script C:/projects/vim-win32-installer/vim/src/testdir/runtest.vim[607]..function RunTheTest[57]..Test_source_files[8]..<SNR>8_PerformCheck[11]..<SNR>8_ReportError line 2: ../iid_ole.c line 12: trailing white space
	command line..script C:/projects/vim-win32-installer/vim/src/testdir/runtest.vim[607]..function RunTheTest[57]..Test_source_files[6]..<SNR>8_PerformCheck[11]..<SNR>8_ReportError line 2: ../if_ole.h line 60: space before Tab
	command line..script C:/projects/vim-win32-installer/vim/src/testdir/runtest.vim[607]..function RunTheTest[57]..Test_source_files[8]..<SNR>8_PerformCheck[11]..<SNR>8_ReportError line 2: ../if_ole.h line 10: trailing white space
```

Exclude them from style checking.

closes: vim#15309

Signed-off-by: Ken Takata <[email protected]>
Signed-off-by: Christian Brabandt <[email protected]>
  • Loading branch information
k-takata authored and chrisbra committed Jul 20, 2024
1 parent 0be03e1 commit c8a582a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/testdir/test_codestyle.vim
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ def Test_source_files()
g:ignoreSwapExists = 'e'
exe 'edit ' .. fname

# Some files are generated files and may contain space errors.
if fname =~ 'dlldata.c'
|| fname =~ 'if_ole.h'
|| fname =~ 'iid_ole.c'
continue
endif

PerformCheck(fname, ' \t', 'space before Tab', '')

PerformCheck(fname, '\s$', 'trailing white space', '')
Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Original file line number Diff line number Diff line change
Expand Up @@ -704,6 +704,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
606,
/**/
605,
/**/
Expand Down

0 comments on commit c8a582a

Please sign in to comment.