mirror of
https://github.com/neovim/neovim.git
synced 2025-09-07 11:58:17 +00:00
clint: Allow including .c.h files multiple times
Except when they are system just in case. There should be no .c.h system files though, but if there will be it is unlikely that they inherit the same convention.
This commit is contained in:
@@ -3001,9 +3001,10 @@ def CheckIncludeLine(filename, clean_lines, linenum, include_state, error):
|
||||
include = match.group(2)
|
||||
is_system = (match.group(1) == '<')
|
||||
if include in include_state:
|
||||
error(filename, linenum, 'build/include', 4,
|
||||
'"%s" already included at %s:%s' %
|
||||
(include, filename, include_state[include]))
|
||||
if is_system or not include.endswith('.c.h'):
|
||||
error(filename, linenum, 'build/include', 4,
|
||||
'"%s" already included at %s:%s' %
|
||||
(include, filename, include_state[include]))
|
||||
else:
|
||||
include_state[include] = linenum
|
||||
|
||||
|
Reference in New Issue
Block a user