(input_api, output_api)
| 208 | |
| 209 | |
| 210 | def 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 | |
| 258 | def CheckGeneratedFiles(input_api, output_api): |
nothing calls this directly
no test coverage detected