mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-31 07:03:55 +00:00 
			
		
		
		
	Merge branch 'helper_for_name_suffix' into integration
This commit is contained in:
		| @@ -246,6 +246,9 @@ std::string make_name_with_suffix(const std::string &name, char sep, const std:: | ||||
|  | ||||
|   // Silently truncate if needed: prioritize keeping the full suffix | ||||
|   if (total_len >= MAX_NAME_WITH_SUFFIX_SIZE) { | ||||
|     // NOTE: This calculation could underflow if suffix_len >= MAX_NAME_WITH_SUFFIX_SIZE - 2, | ||||
|     // but this is safe because this helper is only called with small suffixes: | ||||
|     // MAC suffixes (6-12 bytes), ".local" (6 bytes), etc. | ||||
|     name_len = MAX_NAME_WITH_SUFFIX_SIZE - suffix_len - 2;  // -2 for separator and null terminator | ||||
|     total_len = name_len + 1 + suffix_len; | ||||
|   } | ||||
|   | ||||
| @@ -244,7 +244,7 @@ def main() -> None: | ||||
|         component | ||||
|         for component in changed_components | ||||
|         if (component_test_dir := tests_dir / component).exists() | ||||
|         and any(component_test_dir.glob("test.*.yaml")) | ||||
|         and next(component_test_dir.glob("test.*.yaml"), None) is not None | ||||
|     ] | ||||
|  | ||||
|     # Build output | ||||
|   | ||||
		Reference in New Issue
	
	Block a user