exempt LINT.ThenChange line when checking long line

LINT.ThenChange is followed by path which sometimes may exceed the
length limit

Bug: 382239821
Change-Id: I2142fd3326704593bd46c8937b1bb904bcef4763
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6077446
Auto-Submit: Yiwei Zhang <yiwzhang@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
changes/46/6077446/2
Yiwei Zhang 5 months ago committed by LUCI CQ
parent 67ddd5efb7
commit 40ef124163

@ -601,24 +601,21 @@ def CheckLongLines(input_api, output_api, maxlen, source_file_filter=None):
# '.h' is considered an obj-c file extension, since OBJC_EXCEPTIONS are a
# superset of CPP_EXCEPTIONS.
CPP_FILE_EXTS = ('c', 'cc')
CPP_EXCEPTIONS = ('#define', '#endif', '#if', '#include', '#pragma')
CPP_EXCEPTIONS = ('#define', '#endif', '#if', '#include', '#pragma',
'// LINT.ThenChange(')
HTML_FILE_EXTS = ('html', )
HTML_EXCEPTIONS = (
'<g ',
'<link ',
'<path ',
)
HTML_EXCEPTIONS = ('<g ', '<link ', '<path ', '<!-- LINT.ThenChange(')
JAVA_FILE_EXTS = ('java', )
JAVA_EXCEPTIONS = ('import ', 'package ')
JAVA_EXCEPTIONS = ('import ', 'package ', '// LINT.ThenChange(')
JS_FILE_EXTS = ('js', )
JS_EXCEPTIONS = ("GEN('#include", 'import ')
JS_EXCEPTIONS = ("GEN('#include", 'import ', '// LINT.ThenChange(')
TS_FILE_EXTS = ('ts', )
TS_EXCEPTIONS = ('import ')
TS_EXCEPTIONS = ('import ', '// LINT.ThenChange(')
OBJC_FILE_EXTS = ('h', 'm', 'mm')
OBJC_EXCEPTIONS = ('#define', '#endif', '#if', '#import', '#include',
'#pragma')
'#pragma', '// LINT.ThenChange(')
PY_FILE_EXTS = ('py', )
PY_EXCEPTIONS = ('import', 'from')
PY_EXCEPTIONS = ('import', 'from', '# LINT.ThenChange(')
LANGUAGE_EXCEPTIONS = [
(CPP_FILE_EXTS, CPP_EXCEPTIONS),

Loading…
Cancel
Save