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

Function get_source_files_hash

ci/meson/test_discovery.py:234–254  ·  view source on GitHub ↗

Get combined hash of all .cpp/.h/.hpp files in src/ and tests/ directories. Kept for backward compatibility. The combined hash is used as the marker value stored in .source_files_hash. Returns: Tuple of (hash_string, sorted_file_list)

(source_dir: Path)

Source from the content-addressed store, hash-verified

232
233
234def get_source_files_hash(source_dir: Path) -> tuple[str, list[str]]:
235 """
236 Get combined hash of all .cpp/.h/.hpp files in src/ and tests/ directories.
237
238 Kept for backward compatibility. The combined hash is used as the marker
239 value stored in .source_files_hash.
240
241 Returns:
242 Tuple of (hash_string, sorted_file_list)
243 """
244 try:
245 src_files = _discover_files_in_dir(source_dir, "src")
246 test_files = _discover_files_in_dir(source_dir, "tests")
247 all_files = sorted(src_files + test_files)
248 return (_hash_file_list(all_files), all_files)
249 except KeyboardInterrupt as ki:
250 handle_keyboard_interrupt(ki)
251 raise
252 except Exception as e:
253 _ts_print(f"[MESON] Warning: Failed to get source file hash: {e}")
254 return ("", [])
255
256
257def get_split_source_hashes(source_dir: Path) -> SplitSourceHashes:

Callers 1

compute_source_hashesFunction · 0.90

Calls 3

_discover_files_in_dirFunction · 0.85
_hash_file_listFunction · 0.85

Tested by

no test coverage detected