Skip to content

Commit 518bfae

Browse files
OrKoNDevtools-frontend LUCI CQ
authored andcommitted
Fix presubmit on Windows
Previously, we added --full to work around the problem which was fixed for the code branch invoked without the --full switch but still is the problem for the --full arg. This change removes the --full switch as it is buggy on Windows (https://crbug.com/381836586) Bug: 381836586 Change-Id: I6f94ff8bce457a5997059ee8c8e8563454a91325 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6063659 Reviewed-by: Danil Somsikov <[email protected]> Commit-Queue: Danil Somsikov <[email protected]> Auto-Submit: Alex Rudenko <[email protected]>
1 parent 97a2038 commit 518bfae

File tree

1 file changed

+1
-24
lines changed

1 file changed

+1
-24
lines changed

PRESUBMIT.py

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -179,33 +179,10 @@ def _CheckFormat(input_api, output_api):
179179
'Non-git environment detected, skipping _CheckFormat.')
180180
]
181181

182-
files_with_potential_large_diffs = _getAffectedFiles(
183-
input_api, [
184-
input_api.os_path.join(input_api.PresubmitLocalPath(),
185-
'node_modules'),
186-
input_api.os_path.join(input_api.PresubmitLocalPath(), 'front_end',
187-
'third_party'),
188-
input_api.os_path.join(input_api.PresubmitLocalPath(), 'front_end',
189-
'generated'),
190-
input_api.os_path.join(input_api.PresubmitLocalPath(), 'front_end',
191-
'models', 'javascript_metadata'),
192-
], [], [])
193-
194-
# Changes to the above directories can produce large diffs. This is a problem on Windows,
195-
# where clang-format-diff.py specifies all the diff ranges on the command line when invoking
196-
# clang-format. Since command line length is limited on Win, the invocation fails.
197-
# As a heuristic, we'll format all touched files fully if we suspect that the diff could
198-
# be large.
199-
# TODO(crbug.com/1068198): Remove once `git cl format --js` can handle large CLs.
200-
additional_args = []
201-
if (len(files_with_potential_large_diffs) > 0):
202-
additional_args = ['--full']
203-
204182
results = [output_api.PresubmitNotifyResult('Running Format Checks:')]
205183

206184
return _ExecuteSubProcess(input_api, output_api,
207-
['git', 'cl', 'format', '--js'] +
208-
additional_args, [], results)
185+
['git', 'cl', 'format', '--js'], [], results)
209186

210187

211188
def _CheckDevToolsRunESLintTests(input_api, output_api):

0 commit comments

Comments
 (0)