Uncap max line length for *.star files

In https://crrev.com/c/6697693, presubmit's canned formatting checks
started looking at *.star files. This included enforcing a max line
length of 80 chars in such files.

Most (all?) *.star files found in gclient-managed repos are lucicfg
client repos, which generally have their own formatter and use 4-space
indents. This can lead to some friction with presubmit's 80 char limit.
So this uncaps that limit for all *.star files.

Bug: None
Change-Id: Ice68676c5d097d7951e83cf81ca9ac8adc8151ed
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6862147
Reviewed-by: Scott Lee <ddoman@chromium.org>
Commit-Queue: Ben Pastene <bpastene@chromium.org>
changes/47/6862147/4
Ben Pastene 3 months ago committed by LUCI CQ
parent 18fc4e5507
commit dc84b2708f

@ -624,6 +624,11 @@ def CheckLongLines(input_api, output_api, maxlen, source_file_filter=None):
PY_FILE_EXTS = ('py', )
PY_EXCEPTIONS = ('import', 'from', '# ' + LINT_THEN_CHANGE_EXCEPTION)
# Uncap star files. For more info, see:
# https://bazel.build/build/style-guide#differences-python-style-guide
STAR_FILE_EXTS = ('star', )
STAR_EXCEPTIONS = ('', )
LANGUAGE_EXCEPTIONS = [
(CPP_FILE_EXTS, CPP_EXCEPTIONS),
(HTML_FILE_EXTS, HTML_EXCEPTIONS),
@ -632,6 +637,7 @@ def CheckLongLines(input_api, output_api, maxlen, source_file_filter=None):
(TS_FILE_EXTS, TS_EXCEPTIONS),
(OBJC_FILE_EXTS, OBJC_EXCEPTIONS),
(PY_FILE_EXTS, PY_EXCEPTIONS),
(STAR_FILE_EXTS, STAR_EXCEPTIONS),
]
def no_long_lines(file_extension, line):

Loading…
Cancel
Save