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

Function main

ci/util/build_info_analyzer.py:419–551  ·  view source on GitHub ↗

Main function for command line usage.

()

Source from the content-addressed store, hash-verified

417
418
419def main():
420 """Main function for command line usage."""
421 parser = argparse.ArgumentParser(
422 description="Analyze build_info.json files to extract platform information",
423 formatter_class=argparse.RawDescriptionHelpFormatter,
424 epilog="""
425Examples:
426 %(prog)s --list-boards # List all available boards
427 %(prog)s --board uno --show-defines # Show UNO platform defines
428 %(prog)s --board esp32dev --show-compiler # Show ESP32 compiler info
429 %(prog)s --board teensy31 --show-all # Show all info for Teensy 3.1
430 %(prog)s --compare uno esp32dev # Compare defines between boards
431 """,
432 )
433
434 parser.add_argument(
435 "--build-dir",
436 default=".build",
437 help="Build directory containing platform subdirectories (default: .build)",
438 )
439
440 parser.add_argument(
441 "--list-boards",
442 action="store_true",
443 help="List all boards with build_info.json files",
444 )
445
446 parser.add_argument(
447 "--board", help="Board name to analyze (e.g., uno, esp32dev, teensy31)"
448 )
449
450 parser.add_argument(
451 "--show-defines", action="store_true", help="Show platform preprocessor defines"
452 )
453
454 parser.add_argument(
455 "--show-compiler", action="store_true", help="Show compiler information"
456 )
457
458 parser.add_argument(
459 "--show-toolchain", action="store_true", help="Show toolchain aliases"
460 )
461
462 parser.add_argument(
463 "--show-all", action="store_true", help="Show all available information"
464 )
465
466 parser.add_argument(
467 "--compare",
468 nargs=2,
469 metavar=("BOARD1", "BOARD2"),
470 help="Compare platform defines between two boards",
471 )
472
473 parser.add_argument(
474 "--json", action="store_true", help="Output results in JSON format"
475 )
476

Callers 1

Calls 12

list_available_boardsMethod · 0.95
compare_definesMethod · 0.95
get_platform_definesMethod · 0.95
get_compiler_infoMethod · 0.95
get_toolchain_aliasesMethod · 0.95
BuildInfoAnalyzerClass · 0.85
print_comparisonFunction · 0.85
print_definesFunction · 0.85
print_compiler_infoFunction · 0.85
print_toolchain_aliasesFunction · 0.85
parse_argsMethod · 0.80
printFunction · 0.50

Tested by

no test coverage detected