mirror of
https://github.com/neovim/neovim.git
synced 2024-12-19 18:55:14 -07:00
remove "stream check" from CheckIncludeLine
irrelevant
This commit is contained in:
parent
b3edf6c065
commit
4bfb03c630
18
clint.py
18
clint.py
@ -3607,10 +3607,10 @@ def CheckIncludeLine(filename, clean_lines, linenum, include_state, error):
|
||||
line = clean_lines.lines[linenum]
|
||||
|
||||
# "include" should use the new style "foo/bar.h" instead of just "bar.h"
|
||||
if not (filename.endswith('.c') or filename.endswith('.h')):
|
||||
if _RE_PATTERN_INCLUDE_NEW_STYLE.search(line):
|
||||
error(filename, linenum, 'build/include', 4,
|
||||
'Include the directory when naming .h files')
|
||||
# XXX: neovim doesn't currently use this style
|
||||
# if _RE_PATTERN_INCLUDE_NEW_STYLE.search(line):
|
||||
# error(filename, linenum, 'build/include', 4,
|
||||
# 'Include the directory when naming .h files')
|
||||
|
||||
# we shouldn't include a file more than once. actually, there are a
|
||||
# handful of instances where doing so is okay, but in general it's
|
||||
@ -3650,16 +3650,6 @@ def CheckIncludeLine(filename, clean_lines, linenum, include_state, error):
|
||||
'Include "%s" not in alphabetical order' % include)
|
||||
include_state.SetLastHeader(canonical_include)
|
||||
|
||||
# Look for any of the stream classes that are part of standard C++.
|
||||
match = _RE_PATTERN_INCLUDE.match(line)
|
||||
if match:
|
||||
include = match.group(2)
|
||||
if Match(r'(f|ind|io|i|o|parse|pf|stdio|str|)?stream$', include):
|
||||
# Many unit tests use cout, so we exempt them.
|
||||
if not _IsTestFilename(filename):
|
||||
error(filename, linenum, 'readability/streams', 3,
|
||||
'Streams are highly discouraged.')
|
||||
|
||||
|
||||
def _GetTextInside(text, start_pattern):
|
||||
r"""Retrieves all the text between matching open and close parentheses.
|
||||
|
Loading…
Reference in New Issue
Block a user