MCPcopy Create free account
hub / github.com/FastLED/FastLED / main

Function main

ci/lint.py:263–326  ·  view source on GitHub ↗

Main entry point for lint.py.

()

Source from the content-addressed store, hash-verified

261
262
263def main() -> int:
264 """Main entry point for lint.py."""
265 # Parse arguments
266 args = parse_lint_args()
267
268 # Unset VIRTUAL_ENV to avoid warnings
269 os.environ.pop("VIRTUAL_ENV", None)
270
271 # Single-file mode
272 if args.files:
273 print(f"🔍 Single-file lint mode ({len(args.files)} file(s))")
274 print("=" * 50)
275 install_signal_handler()
276 success = run_single_file_mode(
277 args.files,
278 strict=args.run_pyright,
279 use_rust_cpp_lint=args.use_rust_cpp_lint,
280 )
281 return 0 if success else 1
282
283 # Cleanup Visual Studio files and crash dumps
284 cleanup_visual_studio_files()
285 cleanup_crash_dump_files()
286
287 # Print header
288 print_header(args.js_only, args.cpp_only)
289
290 # Install interrupt handler
291 install_signal_handler()
292
293 try:
294 # Create stages
295 stages = create_stages(args)
296
297 # Create duration tracker
298 tracker = DurationTracker()
299
300 # Determine if we should run in parallel
301 # Parallel mode: 2+ stages and not in single-mode (--cpp/--js)
302 parallel = len(stages) > 1 and not args.js_only and not args.cpp_only
303
304 # Create orchestrator
305 orchestrator = LintOrchestrator(stages, tracker, parallel)
306
307 # Run all stages
308 success = orchestrator.run()
309
310 # Print footer
311 print_footer(args.js_only, args.cpp_only)
312
313 # Print summary table
314 print(tracker.generate_summary())
315
316 # Print AI hints
317 print_ai_hints()
318
319 # Return exit code
320 return 0 if success else 1

Callers 1

lint.pyFile · 0.70

Calls 15

runMethod · 0.95
generate_summaryMethod · 0.95
parse_lint_argsFunction · 0.90
install_signal_handlerFunction · 0.90
DurationTrackerClass · 0.90
LintOrchestratorClass · 0.90
wait_for_cleanupFunction · 0.90
run_single_file_modeFunction · 0.85
cleanup_crash_dump_filesFunction · 0.85
print_headerFunction · 0.85
create_stagesFunction · 0.85

Tested by

no test coverage detected