MCPcopy Create free account
hub / github.com/ChromeDevTools/devtools-frontend / CheckDevToolsLint

Function CheckDevToolsLint

PRESUBMIT.py:210–255  ·  view source on GitHub ↗
(input_api, output_api)

Source from the content-addressed store, hash-verified

208
209
210def CheckDevToolsLint(input_api, output_api):
211 lint_path = input_api.os_path.join(input_api.PresubmitLocalPath(),
212 'scripts', 'test', 'run_lint_check.mjs')
213
214 lint_related_paths = [
215 input_api.os_path.join(input_api.PresubmitLocalPath(),
216 'eslint.config.mjs'),
217 input_api.os_path.join(input_api.PresubmitLocalPath(),
218 '.stylelintrc.json'),
219 input_api.os_path.join(input_api.PresubmitLocalPath(),
220 '.stylelintignore'),
221 # This file includes the LitAnalyzer rules
222 input_api.os_path.join(input_api.PresubmitLocalPath(), 'front_end',
223 'tsconfig.json'),
224 input_api.os_path.join(input_api.PresubmitLocalPath(), 'scripts',
225 'test', 'run_lint_check.mjs'),
226 input_api.os_path.join(input_api.PresubmitLocalPath(), 'node_modules'),
227 ]
228
229 lint_config_files = _GetAffectedFiles(input_api, lint_related_paths, [],
230 [])
231
232 should_bail_out, files_to_lint = _GetFilesToLint(
233 input_api, lint_config_files, ['.css', '.mjs', '.js', '.ts'])
234 if should_bail_out:
235 # Run the formatter on all non-js like files
236 results = []
237 results.extend(_CheckFormat(input_api, output_api))
238 return results
239
240 # If there are more than 50 files to check, don't bother and check
241 # everything, so as to not run into command line length limits on Windows.
242 if len(files_to_lint) > 50:
243 files_to_lint = []
244
245 results = []
246 results.extend(
247 _CheckWithNodeScript(input_api,
248 output_api,
249 lint_path,
250 script_arguments=files_to_lint,
251 allow_typescript=True,
252 message="Lint"))
253
254 results.extend(_CheckFormat(input_api, output_api))
255 return results
256
257
258def CheckGeneratedFiles(input_api, output_api):

Callers

nothing calls this directly

Calls 5

_GetAffectedFilesFunction · 0.85
_GetFilesToLintFunction · 0.85
_CheckFormatFunction · 0.85
_CheckWithNodeScriptFunction · 0.85
joinMethod · 0.45

Tested by

no test coverage detected