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

Function main

ci/cpp_lint_cache.py:122–147  ·  view source on GitHub ↗

Main entry point for C++ lint cache checking.

()

Source from the content-addressed store, hash-verified

120
121
122def main() -> int:
123 """Main entry point for C++ lint cache checking."""
124 if len(sys.argv) < 2:
125 print("Usage: python ci/cpp_lint_cache.py [check|success|failure]")
126 return 1
127
128 command = sys.argv[1]
129
130 if command == "check":
131 # Check if linting is needed
132 needs_lint = check_cpp_files_changed()
133 return 0 if needs_lint else 1 # Exit 1 means skip linting
134
135 elif command == "success":
136 # Mark lint as successful
137 mark_cpp_lint_success()
138 return 0
139
140 elif command == "failure":
141 # Invalidate cache on failure
142 invalidate_cpp_cache()
143 return 0
144
145 else:
146 print(f"Unknown command: {command}")
147 return 1
148
149
150if __name__ == "__main__":

Callers 1

cpp_lint_cache.pyFile · 0.70

Calls 4

check_cpp_files_changedFunction · 0.85
mark_cpp_lint_successFunction · 0.85
invalidate_cpp_cacheFunction · 0.85
printFunction · 0.50

Tested by

no test coverage detected