mirror of
https://github.com/neovim/neovim.git
synced 2025-12-07 15:14:04 +00:00
remove "stream check" from CheckIncludeLine
irrelevant
This commit is contained in:
committed by
Thiago de Arruda
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]
|
line = clean_lines.lines[linenum]
|
||||||
|
|
||||||
# "include" should use the new style "foo/bar.h" instead of just "bar.h"
|
# "include" should use the new style "foo/bar.h" instead of just "bar.h"
|
||||||
if not (filename.endswith('.c') or filename.endswith('.h')):
|
# XXX: neovim doesn't currently use this style
|
||||||
if _RE_PATTERN_INCLUDE_NEW_STYLE.search(line):
|
# if _RE_PATTERN_INCLUDE_NEW_STYLE.search(line):
|
||||||
error(filename, linenum, 'build/include', 4,
|
# error(filename, linenum, 'build/include', 4,
|
||||||
'Include the directory when naming .h files')
|
# 'Include the directory when naming .h files')
|
||||||
|
|
||||||
# we shouldn't include a file more than once. actually, there are a
|
# 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
|
# 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 "%s" not in alphabetical order' % include)
|
||||||
include_state.SetLastHeader(canonical_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):
|
def _GetTextInside(text, start_pattern):
|
||||||
r"""Retrieves all the text between matching open and close parentheses.
|
r"""Retrieves all the text between matching open and close parentheses.
|
||||||
|
|||||||
Reference in New Issue
Block a user