CheckSectionSpacing(filename, clean_lines, classinfo, linenum, error)
_RE_PATTERN_INCLUDE_NEW_STYLE = re.compile(r"//include +"[^/]+\.h"")
_RE_PATTERN_INCLUDE = re.compile(r"^\s*//\s*include\s*([<"])([^>"]*)[>"].*$")
// Matches the first component of a filename delimited by -s and _s. That is:
// _RE_FIRST_COMPONENT.match("foo").group(0) == "foo"
// _RE_FIRST_COMPONENT.match("foo.cc").group(0) == "foo"
// _RE_FIRST_COMPONENT.match("foo-bar_baz.cc").group(0) == "foo"
// _RE_FIRST_COMPONENT.match("foo_bar-baz.cc").group(0) == "foo"
_RE_FIRST_COMPONENT = re.compile(r"^[^-_.]+")
def _DropCommonSuffixes(filename):
Drops common suffixes like _test.cc or -inl.h from filename.