mirror of
https://github.com/esphome/esphome.git
synced 2025-09-01 10:52:19 +01:00
Add pre-commit hooks to fix common formatting issues causing CI failures (#9494)
This commit is contained in:
@@ -126,7 +126,8 @@ def write_file_content(path: Path, content: str) -> None:
|
||||
def write_hash(hash_value: str) -> None:
|
||||
"""Write hash to file"""
|
||||
hash_file = Path(__file__).parent.parent / ".clang-tidy.hash"
|
||||
write_file_content(hash_file, hash_value)
|
||||
# Strip any trailing newlines to ensure consistent formatting
|
||||
write_file_content(hash_file, hash_value.strip() + "\n")
|
||||
|
||||
|
||||
def main() -> None:
|
||||
|
Reference in New Issue
Block a user