MCPcopy Create free account
hub / github.com/ElementsProject/lightning / main

Function main

devtools/include-order-fixer.py:370–390  ·  view source on GitHub ↗

Main entry point.

()

Source from the content-addressed store, hash-verified

368
369
370def main():
371 """Main entry point."""
372 files_with_types = get_files_to_check()
373
374 modified_files = []
375
376 for filepath, file_type in files_with_types:
377 if not os.path.exists(filepath):
378 # File might not exist (generated files, etc.)
379 continue
380
381 if fix_file_includes(filepath, file_type):
382 modified_files.append(filepath)
383
384 # Exit with appropriate code
385 if modified_files:
386 # Files were modified - exit 1 so pre-commit shows the diff
387 sys.exit(1)
388 else:
389 # No changes needed
390 sys.exit(0)
391
392
393if __name__ == "__main__":

Callers 1

Calls 2

get_files_to_checkFunction · 0.85
fix_file_includesFunction · 0.85

Tested by

no test coverage detected