mirror of
https://github.com/google/styleguide.git
synced 2024-03-22 13:11:43 +08:00
The base_name should fully match the exclude_files pattern
Previously, a path in the same directory as the CPPLINT.cfg is excluded if one of its prefixes matches the pattern, which leads some confusing cases like "exclude_files=l" excluding "libs". Now we should change the pattern to "exclude_files=l.*" to achieve the same result.
This commit is contained in:
parent
2173b8d68c
commit
4ea770fdfd
2
cpplint/cpplint.py
vendored
2
cpplint/cpplint.py
vendored
|
@ -5989,7 +5989,7 @@ def ProcessConfigOverrides(filename):
|
||||||
# and not "baz" nor "bar/baz.cc".
|
# and not "baz" nor "bar/baz.cc".
|
||||||
if base_name:
|
if base_name:
|
||||||
pattern = re.compile(val)
|
pattern = re.compile(val)
|
||||||
if pattern.match(base_name):
|
if pattern.fullmatch(base_name):
|
||||||
if _cpplint_state.quiet:
|
if _cpplint_state.quiet:
|
||||||
# Suppress "Ignoring file" warning when using --quiet.
|
# Suppress "Ignoring file" warning when using --quiet.
|
||||||
return False
|
return False
|
||||||
|
|
Loading…
Reference in New Issue
Block a user