mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 18:51:29 +00:00
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>
This commit is contained in:
@@ -624,6 +624,11 @@ def CheckLongLines(input_api, output_api, maxlen, source_file_filter=None):
|
|||||||
PY_FILE_EXTS = ('py', )
|
PY_FILE_EXTS = ('py', )
|
||||||
PY_EXCEPTIONS = ('import', 'from', '# ' + LINT_THEN_CHANGE_EXCEPTION)
|
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 = [
|
LANGUAGE_EXCEPTIONS = [
|
||||||
(CPP_FILE_EXTS, CPP_EXCEPTIONS),
|
(CPP_FILE_EXTS, CPP_EXCEPTIONS),
|
||||||
(HTML_FILE_EXTS, HTML_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),
|
(TS_FILE_EXTS, TS_EXCEPTIONS),
|
||||||
(OBJC_FILE_EXTS, OBJC_EXCEPTIONS),
|
(OBJC_FILE_EXTS, OBJC_EXCEPTIONS),
|
||||||
(PY_FILE_EXTS, PY_EXCEPTIONS),
|
(PY_FILE_EXTS, PY_EXCEPTIONS),
|
||||||
|
(STAR_FILE_EXTS, STAR_EXCEPTIONS),
|
||||||
]
|
]
|
||||||
|
|
||||||
def no_long_lines(file_extension, line):
|
def no_long_lines(file_extension, line):
|
||||||
|
|||||||
Reference in New Issue
Block a user