Repository Analysis

esphome/esphome

ESPHome is a system to control your ESP32, ESP8266, BK72xx, RP2040 by simple yet powerful configuration files and control them remotely through Home Automation systems.

9.1 Low AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of esphome/esphome, a C++ project with 11,380 GitHub stars. SynthScan v2.0 examined 721,652 lines of code across 7703 source files, recording 5435 pattern matches distributed across 21 syntactic categories. The overall adjusted score of 9.1 places this repository in the Low AI signal band.

The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).

9.1
Adjusted Score
9.1
Raw Score
100%
Time Factor
2026-07-14
Last Push
11.4K
Stars
C++
Language
721.7K
Lines of Code
7.7K
Files
5.4K
Pattern Hits
2026-07-14
Scan Date
0.01
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.

Severity Breakdown

Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.

CRITICAL 0HIGH 67MEDIUM 482LOW 4886

Directory Score Breakdown

This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.

Pattern Findings

The scanner identified 5435 distinct pattern matches across 21 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.

Hyper-Verbose Identifiers3252 hits · 2881 pts
SeverityFileLineSnippetContext
LOWtests/unit_tests/test_upload_targets.py19def test_get_port_type_serial(port: str) -> None:CODE
LOWtests/unit_tests/test_upload_targets.py24def test_get_port_type_bootsel() -> None:CODE
LOWtests/unit_tests/test_upload_targets.py34def test_get_port_type_mqttip() -> None:CODE
LOWtests/unit_tests/test_upload_targets.py48def test_get_port_type_network(port: str) -> None:CODE
LOWtests/unit_tests/test_upload_targets.py53def test_port_type_values_are_stable() -> None:CODE
LOWtests/unit_tests/test_upload_targets.py67def test_main_re_exports_for_backwards_compat() -> None:CODE
LOWtests/unit_tests/test_wizard.py44def test_sanitize_quotes_replaces_with_escaped_char():CODE
LOWtests/unit_tests/test_wizard.py58def test_config_file_fallback_ap_includes_descriptive_name(CODE
LOWtests/unit_tests/test_wizard.py91def test_config_file_should_include_ota(default_config: dict[str, Any]):CODE
LOWtests/unit_tests/test_wizard.py104def test_config_file_should_include_ota_when_password_set(CODE
LOWtests/unit_tests/test_wizard.py121def test_config_file_should_include_api_encryption_key(CODE
LOWtests/unit_tests/test_wizard.py139def test_wizard_write_sets_platform(CODE
LOWtests/unit_tests/test_wizard.py178def test_wizard_upload_config(tmp_path: Path, monkeypatch: MonkeyPatch):CODE
LOWtests/unit_tests/test_wizard.py329def test_safe_print_step_prints_step_number_and_description(monkeypatch: MonkeyPatch):CODE
LOWtests/unit_tests/test_wizard.py353def test_default_input_uses_default_if_no_input_supplied(monkeypatch: MonkeyPatch):CODE
LOWtests/unit_tests/test_wizard.py369def test_default_input_uses_user_supplied_value(monkeypatch: MonkeyPatch):CODE
LOWtests/unit_tests/test_wizard.py386def test_strip_accents_removes_diacritics():CODE
LOWtests/unit_tests/test_wizard.py402def test_wizard_rejects_path_with_invalid_extension():CODE
LOWtests/unit_tests/test_wizard.py417def test_wizard_rejects_existing_files(tmp_path):CODE
LOWtests/unit_tests/test_wizard.py507def test_wizard_offers_better_node_name(CODE
LOWtests/unit_tests/test_wizard.py540def test_wizard_requires_correct_platform(CODE
LOWtests/unit_tests/test_wizard.py564def test_wizard_requires_correct_board(CODE
LOWtests/unit_tests/test_wizard.py588def test_wizard_requires_valid_ssid(CODE
LOWtests/unit_tests/test_wizard.py612def test_wizard_write_protects_existing_config(CODE
LOWtests/unit_tests/test_wizard.py633def test_wizard_accepts_ota_password(CODE
LOWtests/unit_tests/test_wizard.py660def test_wizard_accepts_rpipico_board(tmp_path: Path, monkeypatch: MonkeyPatch):CODE
LOWtests/unit_tests/test_wizard.py691def test_fallback_psk_uses_secrets_choice(CODE
LOWtests/unit_tests/test_address_cache.py13def test_normalize_simple_hostname() -> None:CODE
LOWtests/unit_tests/test_address_cache.py20def test_normalize_removes_trailing_dots() -> None:CODE
LOWtests/unit_tests/test_address_cache.py28def test_normalize_converts_to_lowercase() -> None:CODE
LOWtests/unit_tests/test_address_cache.py102def test_get_addresses_auto_detection() -> None:CODE
LOWtests/unit_tests/test_address_cache.py124def test_add_mdns_addresses_stores_and_normalizes() -> None:CODE
LOWtests/unit_tests/test_address_cache.py137def test_add_mdns_addresses_empty_is_noop() -> None:CODE
LOWtests/unit_tests/test_address_cache.py173def test_from_cli_args_single_entry() -> None:CODE
LOWtests/unit_tests/test_address_cache.py184def test_from_cli_args_multiple_ips() -> None:CODE
LOWtests/unit_tests/test_address_cache.py195def test_from_cli_args_multiple_entries() -> None:CODE
LOWtests/unit_tests/test_address_cache.py215def test_from_cli_args_normalization() -> None:CODE
LOWtests/unit_tests/test_address_cache.py233def test_from_cli_args_whitespace_handling() -> None:CODE
LOWtests/unit_tests/test_address_cache.py244def test_from_cli_args_invalid_format(caplog: LogCaptureFixture) -> None:CODE
LOWtests/unit_tests/test_address_cache.py307def test_normalize_hostname_parametrized(hostname: str, expected: str) -> None:CODE
LOWtests/unit_tests/test_address_cache.py320def test_parse_cache_args_parametrized(CODE
LOWtests/unit_tests/test_espidf_component.py56def test_idf_component_sanitized_name():CODE
LOWtests/unit_tests/test_espidf_component.py61def test_idf_component_require_name():CODE
LOWtests/unit_tests/test_espidf_component.py66def test_collect_filtered_files_basic(tmp_path):CODE
LOWtests/unit_tests/test_espidf_component.py375def test_node_key_registry_owner_name():CODE
LOWtests/unit_tests/test_espidf_component.py380def test_node_key_registry_bare_name():CODE
LOWtests/unit_tests/test_espidf_component.py385def test_normalize_dependencies_none():CODE
LOWtests/unit_tests/test_espidf_component.py389def test_normalize_dependencies_list_form():CODE
LOWtests/unit_tests/test_espidf_component.py394def test_normalize_dependencies_dict_form():CODE
LOWtests/unit_tests/test_espidf_component.py400def test_normalize_dependencies_dict_form_nested_spec():CODE
LOWtests/unit_tests/test_espidf_component.py439def test_resolve_registry_version_intersects_constraints(monkeypatch):CODE
LOWtests/unit_tests/test_espidf_component.py448def test_resolve_registry_version_picks_highest_satisfying(monkeypatch):CODE
LOWtests/unit_tests/test_espidf_component.py454def test_resolve_registry_version_conflict_raises(monkeypatch):CODE
LOWtests/unit_tests/test_espidf_component.py460def test_generate_idf_components_dedupes_shared_dependency(CODE
LOWtests/unit_tests/test_espidf_component.py78def test_collect_filtered_files_exclude(tmp_path):CODE
LOWtests/unit_tests/test_espidf_component.py89def test_split_list_by_condition():CODE
LOWtests/unit_tests/test_espidf_component.py101def test_generate_cmakelists_txt_basic(tmp_component):CODE
LOWtests/unit_tests/test_espidf_component.py115def test_generate_cmakelists_txt_with_flags(tmp_component, tmp_path):CODE
LOWtests/unit_tests/test_espidf_component.py262def test_extra_script_libpath_absolute_outside_library_dir(tmp_path):CODE
LOWtests/unit_tests/test_espidf_component.py273def test_extra_script_failure_returns_empty_result(tmp_path, caplog):CODE
3192 more matches not shown…
Decorative Section Separators355 hits · 1275 pts
SeverityFileLineSnippetContext
MEDIUM…ker/ha-addon-rootfs/etc/cont-init.d/30-esphome-fork.sh2# ==============================================================================COMMENT
MEDIUM…ker/ha-addon-rootfs/etc/cont-init.d/30-esphome-fork.sh7# ==============================================================================COMMENT
MEDIUMtests/unit_tests/test_loader.py535# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit_tests/test_loader.py537# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit_tests/test_loader.py23# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit_tests/test_loader.py25# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit_tests/test_loader.py178# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit_tests/test_loader.py182# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit_tests/test_loader.py342# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit_tests/test_loader.py344# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit_tests/test_substitutions.py681# ── IncludeFile / package loading tests ────────────────────────────────────COMMENT
MEDIUMtests/unit_tests/test_config_normalization.py120# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit_tests/test_config_normalization.py123# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit_tests/test_web_server_ota.py53# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit_tests/test_web_server_ota.py55# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit_tests/test_web_server_ota.py167# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit_tests/test_web_server_ota.py169# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit_tests/test_bundle.py119# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit_tests/test_bundle.py121# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit_tests/test_bundle.py136# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit_tests/test_bundle.py138# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit_tests/test_bundle.py190# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit_tests/test_bundle.py192# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit_tests/test_bundle.py230# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit_tests/test_bundle.py232# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit_tests/test_bundle.py317# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit_tests/test_bundle.py319# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit_tests/test_bundle.py463# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit_tests/test_bundle.py465# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit_tests/test_bundle.py512# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit_tests/test_bundle.py514# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit_tests/test_bundle.py599# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit_tests/test_bundle.py601# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit_tests/test_bundle.py1142# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit_tests/test_bundle.py1144# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit_tests/test_bundle.py1176# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit_tests/test_bundle.py1178# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit_tests/test_bundle.py33# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit_tests/test_bundle.py35# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit_tests/test_bundle.py99# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit_tests/test_bundle.py101# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit_tests/test_bundle.py211# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit_tests/test_bundle.py213# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit_tests/test_bundle.py1353# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit_tests/test_bundle.py1355# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit_tests/test_config_validation.py1169# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit_tests/test_config_validation.py1171# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit_tests/test_config_validation.py1411# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit_tests/test_config_validation.py1413# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit_tests/test_config_validation.py1454# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit_tests/test_config_validation.py1456# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit_tests/test_config_validation.py1497# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit_tests/test_config_validation.py1499# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit_tests/test_config_validation.py1519# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit_tests/test_config_validation.py1521# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit_tests/test_config_validation.py1550# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit_tests/test_config_validation.py1552# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit_tests/test_config_validation.py1582# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit_tests/test_config_validation.py1584# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit_tests/test_config_validation.py1597# ---------------------------------------------------------------------------COMMENT
295 more matches not shown…
Over-Commented Block867 hits · 852 pts
SeverityFileLineSnippetContext
LOWtests/unit_tests/components/test_rp2_generate_boards.py21 #define PIN_WIRE1_SCL (27u)COMMENT
LOWtests/integration/test_status_flags.py141COMMENT
LOWtests/components/psram/validate.esp32-idf.yaml1# Config-only: with no options the single-mode ESP32 resolves mode -> quad andCOMMENT
LOWtests/components/psram/validate.esp32-p4-idf.yaml1# Config-only: the ESP32-P4 has a distinct value set (hex mode, 20/100/200MHz).COMMENT
LOW…ts/mitsubishi_cn105/climate/mitsubishi_cn105_tests.cpp181 // ─────────────────────────────COMMENT
LOW…ts/mitsubishi_cn105/climate/mitsubishi_cn105_tests.cpp201COMMENT
LOWtests/components/camera/common.yaml1# Camera is a base component auto-loaded by esp32_cameraCOMMENT
LOWtests/components/packet_transport/common.h1#pragma onceCOMMENT
LOWtests/components/time/is_valid.cpp1// Regression tests for ESPTime::is_valid() optional checks.COMMENT
LOWtests/components/time/posix_tz_parser.cpp1// Tests for the POSIX TZ parser, time conversion functions, and ESPTime::strptime.COMMENT
LOWtests/components/modbus/heap_probe_test.cpp1#include <gtest/gtest.h>COMMENT
LOWtests/benchmarks/core/bench_scheduler.cpp1#include <benchmark/benchmark.h>COMMENT
LOWtests/benchmarks/components/api/bench_helpers.h1#pragma onceCOMMENT
LOW…uild_components/common/uart_bridge_2/esp32-s3-idf.yaml1# Common configuration for 2-channel UART bridge/expander chipsCOMMENT
LOW…t_build_components/common/uart_bridge_2/esp32-idf.yaml1# Common configuration for 2-channel UART bridge/expander chipsCOMMENT
LOW…uild_components/common/uart_bridge_4/esp32-s3-idf.yaml1# Common configuration for 4-channel UART bridge/expander chipsCOMMENT
LOW…t_build_components/common/uart_bridge_4/esp32-idf.yaml1# Common configuration for 4-channel UART bridge/expander chipsCOMMENT
LOWscript/build_language_schema.py1141 else:COMMENT
LOWscript/build_language_schema.py1181COMMENT
LOWscript/merge_component_configs.py161 return dataCOMMENT
LOWscript/determine-jobs.py701 benchmarked_components = {COMMENT
LOWscript/list-components.py61 # When --changed* is passed, only get the changed filesCOMMENT
LOWscript/split_components_for_ci.py101COMMENT
LOWscript/split_components_for_ci.py161 # Components with the same signature stay in the same batchesCOMMENT
LOW.github/workflows/sync-device-classes.yml61 uv pip install --system -r requirements.txt -r requirements_test.txt pre-commitCOMMENT
LOW.github/workflows/codeql.yml1# For most projects, this workflow file will not need changing; you simply needCOMMENT
LOW.github/workflows/codeql.yml41 # - language: c-cppCOMMENT
LOW.github/workflows/codeql.yml61 languages: ${{ matrix.language }}COMMENT
LOW.github/workflows/ci.yml181 # reuse; dev pushes seed the shared copy instead.COMMENT
LOW.github/workflows/ci.yml1401 steps:COMMENT
LOWesphome/yaml_util.py561 # We found some merge keys along the way, merge them into base pairsCOMMENT
LOWesphome/coroutine.py81 # Examples: async_tcp (200)COMMENT
LOWesphome/coroutine.py121 WEB_SERVER_OTA = 52COMMENT
LOWesphome/loader.py321# imports and resolves them against the canonical component so externalCOMMENT
LOWesphome/__main__.py1481# Legacy substring redaction fallback for unmigrated schemas; removed inCOMMENT
LOWesphome/core/time.h1#pragma onceCOMMENT
LOWesphome/core/helpers.cpp1#include "esphome/core/helpers.h"COMMENT
LOWesphome/core/progmem.h1#pragma onceCOMMENT
LOWesphome/core/progmem.h21#define ESPHOME_snprintf_P snprintf_PCOMMENT
LOWesphome/core/progmem.h41#define ESPHOME_PSTR(s) (s)COMMENT
LOWesphome/core/version.h1#pragma onceCOMMENT
LOWesphome/core/lwip_fast_select.c1// Fast socket monitoring for ESP32 and LibreTiny (LwIP >= 2.1.3)COMMENT
LOWesphome/core/lwip_fast_select.c21// - event_callback (static, same for all sockets): L327COMMENT
LOWesphome/core/lwip_fast_select.c41// lwip_close() -> lwip_close_internal() -> free_socket_free_elements() -> free_socket()COMMENT
LOWesphome/core/lwip_fast_select.c61// - lwip_close_internal (only caller of free_socket_free_elements): L2355COMMENT
LOWesphome/core/lwip_fast_select.c81// sock->conn->callback (netconn_callback, 4-byte function pointer):COMMENT
LOWesphome/core/lwip_fast_select.c101// FreeRTOS task notification value:COMMENT
LOWesphome/core/lwip_fast_select.c121#include <FreeRTOS.h>COMMENT
LOWesphome/core/lwip_fast_select.c181 // Wake the main loop task if sleeping in ulTaskNotifyTake().COMMENT
LOWesphome/core/config.py501#undef delayCOMMENT
LOWesphome/core/event_pool.h1#pragma onceCOMMENT
LOWesphome/core/entity_base.h1#pragma onceCOMMENT
LOWesphome/core/entity_base.h261 uint8_t reserved : 2; // Reserved for future useCOMMENT
LOWesphome/core/hal.h1#pragma onceCOMMENT
LOWesphome/core/hal.h21#include "esphome/components/libretiny/hal.h"COMMENT
LOWesphome/core/application.h1#pragma onceCOMMENT
LOWesphome/core/application.h21#include "esphome/core/string_ref.h"COMMENT
LOWesphome/core/application.h101 void register_device(Device *device) { this->devices_.push_back(device); }COMMENT
LOWesphome/core/application.h221COMMENT
LOWesphome/core/application.h241 // Auto-scale to 1/5 of the configured ESP32 task WDT timeout so the safetyCOMMENT
807 more matches not shown…
Unused Imports333 hits · 292 pts
SeverityFileLineSnippetContext
LOWtests/unit_tests/test_address_cache.py3CODE
LOWtests/unit_tests/test_compiled_config.py3CODE
LOWtests/unit_tests/test_dashboard_import.py10CODE
LOWtests/unit_tests/test_size_summary.py3CODE
LOWtests/unit_tests/test_mqtt.py3CODE
LOWtests/unit_tests/test_espota2.py3CODE
LOWtests/unit_tests/test_util.py3CODE
LOWtests/unit_tests/test_web_server_ota.py3CODE
LOWtests/unit_tests/test_bundle.py3CODE
LOWtests/unit_tests/test_zeroconf.py11CODE
LOWtests/unit_tests/test_main.py3CODE
LOWtests/unit_tests/test_resolver.py3CODE
LOWtests/unit_tests/components/test_rp2_generate_boards.py3CODE
LOWtests/unit_tests/components/api/test_client.py3CODE
LOWtests/unit_tests/build_gen/test_platformio.py3CODE
LOWtests/unit_tests/build_gen/test_espidf.py3CODE
LOWtests/integration/test_large_message_batching.py3CODE
LOWtests/integration/test_host_mode_many_entities.py3CODE
LOWtests/integration/test_wait_until_ordering.py10CODE
LOWtests/integration/test_select_stringref_trigger.py3CODE
LOW…sts/integration/test_binary_sensor_invalidate_state.py10CODE
LOWtests/integration/test_gpio_expander_cache.py3CODE
LOWtests/integration/test_text_command.py8CODE
LOWtests/integration/test_api_action_responses.py6CODE
LOWtests/integration/test_host_mode_basic.py3CODE
LOWtests/integration/test_script_array_params.py10CODE
LOW…ts/integration/test_logger_buffered_recursion_guard.py24CODE
LOWtests/integration/test_addressable_light_transition.py19CODE
LOWtests/integration/test_uart_mock_modbus.py14CODE
LOWtests/integration/conftest.py3CODE
LOWtests/integration/host_prefs.py12CODE
LOWtests/integration/test_runtime_stats.py3CODE
LOWtests/integration/test_script_queued.py3CODE
LOWtests/integration/test_object_id_no_friendly_name.py16CODE
LOWtests/integration/test_legacy_fan_compat.py10CODE
LOW…sts/integration/test_host_mode_empty_string_options.py3CODE
LOWtests/integration/test_scheduler_blocking_warning.py9CODE
LOW…egration/test_object_id_friendly_name_no_mac_suffix.py10CODE
LOWtests/integration/test_api_custom_services.py3CODE
LOWtests/integration/test_syslog.py3CODE
LOWtests/integration/test_water_heater_template.py3CODE
LOWtests/integration/test_host_logger_thread_safety.py7CODE
LOWtests/integration/test_oversized_payloads.py3CODE
LOWtests/integration/test_loop_interval_decoupling.py17CODE
LOWtests/integration/test_uart_mock_ld2412.py25CODE
LOWtests/integration/test_build_info.py3CODE
LOWtests/integration/test_climate_control_action.py8CODE
LOWtests/integration/test_legacy_area.py3CODE
LOWtests/integration/test_host_mode_entity_fields.py3CODE
LOWtests/integration/test_varint_five_byte_device_id.py10CODE
LOWtests/integration/test_safe_mode_loop_runs.py24CODE
LOWtests/integration/test_valve_control_action.py7CODE
LOWtests/integration/test_cover_control_action.py8CODE
LOWtests/integration/test_legacy_climate_compat.py11CODE
LOWtests/integration/test_host_mode_reconnect.py3CODE
LOWtests/integration/test_scheduler_pool.py3CODE
LOWtests/integration/test_api_message_size_batching.py3CODE
LOWtests/integration/test_crc8_helper.py3CODE
LOWtests/integration/test_object_id_api_verification.py24CODE
LOWtests/integration/test_api_homeassistant.py11CODE
273 more matches not shown…
Self-Referential Comments92 hits · 278 pts
SeverityFileLineSnippetContext
MEDIUMtests/unit_tests/test_loader.py122 # Create a mock module with FILTER_SOURCE_FILES functionCOMMENT
MEDIUMtests/unit_tests/test_writer.py850 # Create a real file with markersCOMMENT
MEDIUMtests/unit_tests/test_writer.py940 # Create a file with begin marker but no end markerCOMMENT
MEDIUMtests/unit_tests/test_writer.py962 # Create a file with duplicate begin markersCOMMENT
MEDIUMtests/unit_tests/test_writer.py1095 # Create an absolute custom build path directory with contentsCOMMENT
MEDIUMtests/unit_tests/test_writer.py1193 # Create a file in cwd that must NOT be cleanedCOMMENT
MEDIUMtests/unit_tests/test_writer.py1558 # Create a read-only file (simulating git pack files on Windows)COMMENT
MEDIUMtests/unit_tests/test_writer.py1592 # Create a subdirectory with read-only filesCOMMENT
MEDIUMtests/unit_tests/test_writer.py2237 # Create a source fileCOMMENT
MEDIUMtests/unit_tests/test_writer.py2358 # Create an existing source file in the build treeCOMMENT
MEDIUMtests/unit_tests/test_substitutions.py207 # Create an OrderedDict config with substitutionsCOMMENT
MEDIUMtests/unit_tests/test_substitutions.py297 # Create a minimal valid configCOMMENT
MEDIUMtests/unit_tests/test_substitutions.py327 # Create a minimal valid configCOMMENT
MEDIUMtests/unit_tests/test_espota2.py538 # Create a real firmware fileCOMMENT
MEDIUMtests/unit_tests/test_espota2.py571 # Create a real firmware fileCOMMENT
MEDIUMtests/unit_tests/test_espota2.py586 # Create a real firmware fileCOMMENT
MEDIUMtests/unit_tests/test_git.py59 # Create a simple git repo to test withCOMMENT
MEDIUMtests/unit_tests/test_git.py216 # Create the git repo directory structureCOMMENT
MEDIUMtests/unit_tests/test_git.py280 # Create the git repo directory structureCOMMENT
MEDIUMtests/unit_tests/test_git.py328 # Create the git repo directory structureCOMMENT
MEDIUMtests/unit_tests/test_git.py404 # Create the git repo directory structureCOMMENT
MEDIUMtests/unit_tests/test_git.py289 fetch_head.touch() # Create the fileCODE
MEDIUMtests/unit_tests/test_git.py337 fetch_head.touch() # Create the fileCODE
MEDIUMtests/unit_tests/test_git.py413 fetch_head.touch() # Create the fileCODE
MEDIUMtests/unit_tests/test_util.py587 # Create the expected directory structureCOMMENT
MEDIUMtests/unit_tests/test_yaml_util.py135 # Create an empty secrets fileCOMMENT
MEDIUMtests/unit_tests/test_yaml_util.py145 # Create a YAML file with a secret but no secrets.yamlCOMMENT
MEDIUMtests/unit_tests/test_yaml_util.py123 # Create a YAML file with a secret that doesn't existCOMMENT
MEDIUMtests/unit_tests/test_yaml_util.py166 # Create a subdirectory with a YAML file that uses secretsCOMMENT
MEDIUMtests/unit_tests/test_yaml_util.py324 # Create a dict with unsorted keysCOMMENT
MEDIUMtests/unit_tests/test_helpers.py733 # Create a fileCOMMENT
MEDIUMtests/unit_tests/test_helpers.py744 # Create a file where we want to create a directoryCOMMENT
MEDIUMtests/unit_tests/test_helpers.py838 # Create a directory and make it read-onlyCOMMENT
MEDIUMtests/unit_tests/test_main.py1532 # Create the actual firmware files so they existCOMMENT
MEDIUMtests/unit_tests/test_main.py1634 # Create a test firmware fileCOMMENT
MEDIUMtests/unit_tests/test_main.py4728 # Create a mock OSError with a specific messageCOMMENT
MEDIUMtests/unit_tests/test_main.py4756 # Create a mock OSError without a messageCOMMENT
MEDIUMtests/unit_tests/test_config_helpers.py35 # Create the filter functionCOMMENT
MEDIUMtests/unit_tests/test_config_helpers.py74 # Create the filter functionCOMMENT
MEDIUMtests/unit_tests/test_config_helpers.py103 # Create the filter functionCOMMENT
MEDIUMtests/unit_tests/core/test_config.py718 # Create a mock os module with process_cpu_countCOMMENT
MEDIUMtests/unit_tests/core/test_config.py750 # Create a file (not a directory)COMMENT
MEDIUMtests/unit_tests/core/test_config.py753 # Create a directory without __init__.pyCOMMENT
MEDIUMtests/integration/conftest.py88 # Create the test cache directory if it doesn't existCOMMENT
MEDIUMtests/integration/conftest.py369 # Create a future to signal when connectedCOMMENT
MEDIUMtests/integration/conftest.py515 # Create a pseudo-terminal to make the binary think it's running interactivelyCOMMENT
MEDIUMtests/integration/test_oversized_payloads.py42 # Create an oversized payload (>32768 bytes which is our new limit)COMMENT
MEDIUMtests/integration/test_oversized_payloads.py47 # Create a message with oversized payloadCOMMENT
MEDIUMtests/integration/test_oversized_payloads.py170 # Create an oversized payload (>32768 bytes which is our new limit)COMMENT
MEDIUMtests/integration/test_host_mode_entity_fields.py25 # Create a map of entity names to entity infoCOMMENT
MEDIUMtests/integration/test_object_id_api_verification.py98 # Create a map of entity names to entity infoCOMMENT
MEDIUMtests/integration/test_scheduler_rapid_cancellation.py31 # Create a future to signal test completionCOMMENT
MEDIUMtests/integration/test_scheduler_recursive_timeout.py30 # Create a future to signal test completionCOMMENT
MEDIUMtests/integration/test_scheduler_heap_stress.py31 # Create a future to signal test completionCOMMENT
MEDIUM…s/integration/test_scheduler_simultaneous_callbacks.py31 # Create a future to signal test completionCOMMENT
MEDIUMtests/integration/test_device_id_in_state.py108 # Create a mapping of entity key to expected device_idCOMMENT
MEDIUMtests/integration/test_entity_icon.py25 # Create a map of entity names to entity infoCOMMENT
MEDIUMtests/integration/test_scheduler_bulk_cleanup.py31 # Create a future to signal test completionCOMMENT
MEDIUMtests/integration/test_scheduler_defer_stress.py31 # Create a future to signal test completionCOMMENT
MEDIUMtests/integration/test_host_mode_fan_preset.py28 # Create a map of fan names to entity infoCOMMENT
32 more matches not shown…
Deep Nesting225 hits · 220 pts
SeverityFileLineSnippetContext
LOWdocker/build.py102CODE
LOWdocker/generate_tags.py35CODE
LOWtests/unit_tests/test_compiled_config.py182CODE
LOWtests/unit_tests/test_substitutions.py42CODE
LOWtests/integration/test_scheduler_defer_cancel.py12CODE
LOWtests/integration/test_scheduler_self_keyed.py19CODE
LOWtests/integration/test_scheduler_self_keyed.py36CODE
LOWtests/integration/test_api_action_responses.py19CODE
LOWtests/integration/test_api_action_responses.py49CODE
LOWtests/integration/test_scheduler_string_test.py12CODE
LOWtests/integration/test_scheduler_string_test.py41CODE
LOWtests/integration/conftest.py506CODE
LOWtests/integration/test_api_custom_services.py16CODE
LOWtests/integration/test_api_custom_services.py58CODE
LOW…integration/test_scheduler_internal_id_no_collision.py18CODE
LOW…integration/test_scheduler_internal_id_no_collision.py47CODE
LOWtests/integration/test_scheduler_numeric_id_test.py12CODE
LOWtests/integration/test_scheduler_numeric_id_test.py46CODE
LOWtests/integration/test_scheduler_pool.py14CODE
LOWtests/integration/test_scheduler_pool.py54CODE
LOWtests/integration/test_api_message_size_batching.py14CODE
LOWtests/integration/test_crc8_helper.py14CODE
LOWtests/integration/test_crc8_helper.py44CODE
LOWtests/integration/test_api_homeassistant.py23CODE
LOWtests/integration/test_api_homeassistant.py116CODE
LOWtests/integration/test_scheduler_retry_test.py12CODE
LOWtests/integration/test_scheduler_retry_test.py46CODE
LOWtests/integration/test_loop_disable_enable.py15CODE
LOWtests/integration/test_loop_disable_enable.py61CODE
LOWtests/integration/test_sensor_filters_sliding_window.py15CODE
LOWtests/integration/test_sensor_filters_sliding_window.py39CODE
LOWtests/integration/test_scheduler_rapid_cancellation.py14CODE
LOWtests/integration/test_scheduler_rapid_cancellation.py45CODE
LOWtests/integration/test_sensor_timeout_filter.py15CODE
LOWtests/integration/test_sensor_timeout_filter.py35CODE
LOWtests/integration/test_scheduler_recursive_timeout.py13CODE
LOWtests/integration/test_scheduler_recursive_timeout.py43CODE
LOWtests/integration/state_utils.py333CODE
LOWtests/integration/test_script_wait_on_boot.py31CODE
LOWtests/integration/test_script_wait_on_boot.py61CODE
LOWtests/integration/test_light_automations.py15CODE
LOWtests/integration/test_light_automations.py36CODE
LOWtests/integration/test_scheduler_defer_fifo_simple.py12CODE
LOWtests/integration/test_api_conditional_memory.py15CODE
LOWtests/integration/test_api_conditional_memory.py39CODE
LOWtests/integration/test_sensor_filters_value_list.py16CODE
LOWtests/integration/test_sensor_filters_value_list.py44CODE
LOW…egration/test_alarm_control_panel_state_transitions.py23CODE
LOWtests/integration/test_script_delay_params.py27CODE
LOWtests/integration/test_script_delay_params.py55CODE
LOWtests/integration/test_action_concurrent_reentry.py15CODE
LOWtests/integration/test_action_concurrent_reentry.py42CODE
LOWtests/integration/test_api_action_timeout.py20CODE
LOWtests/integration/test_api_action_timeout.py54CODE
LOWtests/integration/test_automations.py14CODE
LOWtests/integration/test_automations.py38CODE
LOWtests/integration/test_sensor_filters_delta.py15CODE
LOWtests/integration/test_sensor_filters_delta.py36CODE
LOWtests/component_tests/conftest.py108CODE
LOWtests/component_tests/conftest.py121CODE
165 more matches not shown…
Redundant / Tautological Comments103 hits · 166 pts
SeverityFileLineSnippetContext
LOWtests/unit_tests/core/test_entity_helpers.py811 # Set friendly_name to a specific valueCOMMENT
LOWtests/unit_tests/core/test_entity_helpers.py841 # Set friendly_name to emptyCOMMENT
LOWtests/integration/test_host_mode_many_entities.py42 # Check if we have received minimum expected statesCOMMENT
LOWtests/integration/test_gpio_expander_cache.py100 # Check if this line contains a read operation we're trackingCOMMENT
LOWtests/integration/conftest.py85 # Check if the native platform is installed (the actual indicator of a populated cache)COMMENT
LOWtests/integration/conftest.py611 # Check if process diedCOMMENT
LOWtests/integration/test_api_message_size_batching.py174 # Check if we've received states from all expected entitiesCOMMENT
LOWtests/integration/test_api_homeassistant.py99 # Check if this service call is one we're waiting forCOMMENT
LOWtests/integration/test_loop_disable_enable.py82 # Check if component was re-enabled (count > 10)COMMENT
LOWtests/integration/test_sensor_filters_sliding_window.py55 # Check if we received the expected final valueCOMMENT
LOWtests/integration/test_sensor_filters_sliding_window.py230 # Check if both have received their final valuesCOMMENT
LOWtests/integration/test_sensor_filters_ring_buffer.py50 # Check if we've received enough updates from all sensorsCOMMENT
LOWtests/integration/state_utils.py254 # Check if we've now seen all entitiesCOMMENT
LOWtests/integration/test_scheduler_heap_stress.py72 # Check if we've executed all 1000 callbacks (0-999)COMMENT
LOWtests/integration/test_areas_and_devices.py100 # Check if we have all initial statesCOMMENT
LOWtests/integration/test_scheduler_defer_stress.py67 # Check if we've executed all 1000 defers (0-999)COMMENT
LOWtests/integration/test_automations.py123 # Check if we have all 3 completionsCOMMENT
LOWtests/component_tests/conftest.py41 # Check if config directory exists, if not use parent directoryCOMMENT
LOWtests/component_tests/conftest.py43 # Set config_path to a dummy yaml file in the config directoryCOMMENT
LOWtests/component_tests/esp32/test_esp32.py56 # Check if the variant is validCOMMENT
LOWtests/component_tests/sntp/test_init.py140 # Check if merging occurredCOMMENT
LOWscript/determine-jobs.py690 # Check if benchmark infrastructure changedCOMMENT
LOWscript/determine-jobs.py697 # Check if any directly changed component has benchmarksCOMMENT
LOWscript/determine-jobs.py978 # Check if this is a platform-specific fileCOMMENT
LOWscript/analyze_component_buses.py238 # Check if buses are defined directly (not via packages)COMMENT
LOWscript/analyze_component_buses.py363 # Check if component is explicitly isolatedCOMMENT
LOWscript/analyze_component_buses.py368 # Check if component is a base bus componentCOMMENT
LOWscript/analyze_component_buses.py374 # Check if component uses !extend or !remove directivesCOMMENT
LOWscript/analyze_component_buses.py381 # Check if component defines buses directly in test filesCOMMENT
LOWscript/analyze_component_buses.py511 # Check if buses are compatibleCOMMENT
LOWscript/analyze_component_buses.py645 # Output resultsCOMMENT
LOWscript/test_build_components.py178 # Check if last part is a number (version)COMMENT
LOWscript/helpers.py569 # Check if any core C++ or header files changed firstCOMMENT
LOWscript/helpers.py904 # Check if we found any new componentsSTRING
LOWscript/split_components_for_ci.py191 # Check if adding this component would exceed the batch sizeCOMMENT
LOWscript/split_components_for_ci.py312 # Check if this is a merged signature (contains +)COMMENT
LOWscript/api_protobuf/api_protobuf.py502 # Check if this is a packed_buffer field (zero-copy packed repeated)COMMENT
LOWscript/api_protobuf/api_protobuf.py505 # Check if this repeated field has fixed_array_with_length_define optionCOMMENT
LOWscript/api_protobuf/api_protobuf.py510 # Check if this repeated field has fixed_array_size optionCOMMENT
LOWscript/api_protobuf/api_protobuf.py513 # Check if this repeated field has fixed_array_size_define optionCOMMENT
LOWscript/api_protobuf/api_protobuf.py877 # Check if this is being called from a repeated field contextCOMMENT
LOWscript/api_protobuf/api_protobuf.py1601 # Check if underlying type can use dump_fieldCOMMENT
LOWscript/api_protobuf/api_protobuf.py1715 # Check if we should skip encoding when all elements are zeroCOMMENT
LOWscript/api_protobuf/api_protobuf.py1929 # Check if underlying type can use dump_fieldCOMMENT
LOWscript/api_protobuf/api_protobuf.py1970 # Check if this is a pointer field by looking for container_pointer optionCOMMENT
LOWscript/api_protobuf/api_protobuf.py1979 # Check if this should use FixedVector instead of std::vectorCOMMENT
LOWscript/api_protobuf/api_protobuf.py2117 # Check if this is const char* elementsCOMMENT
LOWscript/api_protobuf/api_protobuf.py2159 # Check if this is a fixed-size typeCOMMENT
LOWscript/api_protobuf/api_protobuf.py2168 # Check if inner type produces a constant size (doesn't depend on value)COMMENT
LOWscript/api_protobuf/api_protobuf.py2309 # Check if this message is used by other messagesCOMMENT
LOWscript/api_protobuf/api_protobuf.py2495 # Check if this message has a base classCOMMENT
LOWscript/api_protobuf/api_protobuf.py2709 # Check if this message uses inline_encode — if so, skip generating standaloneCOMMENT
LOWscript/api_protobuf/api_protobuf.py2718 # Check if this message wants speed-optimized encode/calculate_size.COMMENT
LOWscript/api_protobuf/api_protobuf.py2784 # Check if message has any non-deprecated fieldsCOMMENT
LOW.github/workflows/ci.yml874 # Check if /mnt has more free space than / before bind mountingCOMMENT
LOW.github/workflows/ci.yml1101 # Check if memory impact extraction script exists on target branchCOMMENT
LOW.github/workflows/ci.yml1113 # Check if test files exist on the target branch for the requestedCOMMENT
LOWesphome/yaml_util.py506 # Check if key is hashableCOMMENT
LOWesphome/yaml_util.py517 # Check if it is a duplicate keyCOMMENT
LOWesphome/config_helpers.py150 # Check if logger config existsCOMMENT
43 more matches not shown…
Cross-File Repetition30 hits · 150 pts
SeverityFileLineSnippetContext
HIGH…ts/component_tests/binary_sensor/test_binary_sensor.py0when the gpio binary sensor is set in the yaml file, it should be registered in mainSTRING
HIGHtests/component_tests/text/test_text.py0when the gpio binary sensor is set in the yaml file, it should be registered in mainSTRING
HIGHtests/component_tests/gpio/test_gpio_binary_sensor.py0when the gpio binary sensor is set in the yaml file, it should be registered in mainSTRING
HIGH…ts/component_tests/binary_sensor/test_binary_sensor.py0when the mandatory fields are set in the yaml, they should be set in mainSTRING
HIGHtests/component_tests/text_sensor/test_text_sensor.py0when the mandatory fields are set in the yaml, they should be set in mainSTRING
HIGHtests/component_tests/button/test_button.py0when the mandatory fields are set in the yaml, they should be set in mainSTRING
HIGHtests/component_tests/text/test_text.py0when the mandatory fields are set in the yaml, they should be set in mainSTRING
HIGH…ts/component_tests/binary_sensor/test_binary_sensor.py0test that the "internal" config value is correctly setSTRING
HIGHtests/component_tests/text_sensor/test_text_sensor.py0test that the "internal" config value is correctly setSTRING
HIGHtests/component_tests/button/test_button.py0test that the "internal" config value is correctly setSTRING
HIGHtests/component_tests/text/test_text.py0test that the "internal" config value is correctly setSTRING
HIGH…s/component_tests/mipi_spi/test_padding_and_offsets.py0run schema + final validation and return the validated config.STRING
HIGHtests/component_tests/mipi_spi/test_page_selection.py0run schema + final validation and return the validated config.STRING
HIGHtests/component_tests/mipi_spi/test_display_metadata.py0run schema + final validation and return the validated config.STRING
HIGHesphome/components/qspi_dbi/__init__.py0the 'ili9xxx' component is deprecated and no new models will be added to it. new model prs should target the newer and mSTRING
HIGHesphome/components/st7735/__init__.py0the 'ili9xxx' component is deprecated and no new models will be added to it. new model prs should target the newer and mSTRING
HIGHesphome/components/ili9xxx/__init__.py0the 'ili9xxx' component is deprecated and no new models will be added to it. new model prs should target the newer and mSTRING
HIGHesphome/components/mipi_rgb/display.py0it is safe to use strapping pins as rgb output data bits, as they are outputs only, and not initialised until after bootSTRING
HIGHesphome/components/rpi_dpi_rgb/display.py0it is safe to use strapping pins as rgb output data bits, as they are outputs only, and not initialised until after bootSTRING
HIGHesphome/components/st7701s/display.py0it is safe to use strapping pins as rgb output data bits, as they are outputs only, and not initialised until after bootSTRING
HIGHesphome/components/ln882x/__init__.py0██╗ ██╗ █████╗ ██████╗ ███╗ ██╗██╗███╗ ██╗ ██████╗ ██║ ██║██╔══██╗██╔══██╗████╗ ██║██║████╗ ██║██╔════╝ ██║ █╗ ██║██████STRING
HIGHesphome/components/bk72xx/__init__.py0██╗ ██╗ █████╗ ██████╗ ███╗ ██╗██╗███╗ ██╗ ██████╗ ██║ ██║██╔══██╗██╔══██╗████╗ ██║██║████╗ ██║██╔════╝ ██║ █╗ ██║██████STRING
HIGHesphome/components/rtl87xx/__init__.py0██╗ ██╗ █████╗ ██████╗ ███╗ ██╗██╗███╗ ██╗ ██████╗ ██║ ██║██╔══██╗██╔══██╗████╗ ██║██║████╗ ██║██╔════╝ ██║ █╗ ██║██████STRING
HIGHesphome/components/ln882x/boards.py0██╗ ██╗ █████╗ ██████╗ ███╗ ██╗██╗███╗ ██╗ ██████╗ ██║ ██║██╔══██╗██╔══██╗████╗ ██║██║████╗ ██║██╔════╝ ██║ █╗ ██║██████STRING
HIGHesphome/components/bk72xx/boards.py0██╗ ██╗ █████╗ ██████╗ ███╗ ██╗██╗███╗ ██╗ ██████╗ ██║ ██║██╔══██╗██╔══██╗████╗ ██║██║████╗ ██║██╔════╝ ██║ █╗ ██║██████STRING
HIGHesphome/components/rtl87xx/boards.py0██╗ ██╗ █████╗ ██████╗ ███╗ ██╗██╗███╗ ██╗ ██████╗ ██║ ██║██╔══██╗██╔══██╗████╗ ██║██║████╗ ██║██╔════╝ ██║ █╗ ██║██████STRING
HIGHesphome/components/esp32/__init__.py0binary-download entries for a built libretiny firmware. used by device-builder (esphome/device-builder), via ``importlibSTRING
HIGHesphome/components/esp8266/__init__.py0binary-download entries for a built libretiny firmware. used by device-builder (esphome/device-builder), via ``importlibSTRING
HIGHesphome/components/rp2/__init__.py0binary-download entries for a built libretiny firmware. used by device-builder (esphome/device-builder), via ``importlibSTRING
HIGHesphome/components/libretiny/__init__.py0binary-download entries for a built libretiny firmware. used by device-builder (esphome/device-builder), via ``importlibSTRING
Cross-Language Confusion20 hits · 135 pts
SeverityFileLineSnippetContext
HIGHtests/unit_tests/test_compiled_config.py422 '{"storage_version": 1, "name": "lite_test", "friendly_name": null, 'CODE
HIGHtests/unit_tests/test_compiled_config.py423 '"comment": null, "esphome_version": null, "src_version": 1, 'CODE
HIGHtests/unit_tests/test_compiled_config.py424 '"address": null, "web_port": null, "esp_platform": null, 'CODE
HIGHtests/unit_tests/test_compiled_config.py425 '"build_path": null, "firmware_bin_path": null, 'CODE
HIGHtests/unit_tests/test_compiled_config.py427 '"framework": null, "core_platform": null}'CODE
HIGHtests/unit_tests/test_substitutions.py568 yaml_util.add_context(inner, {"a": "${undefined}"})CODE
HIGHtests/unit_tests/test_yaml_util.py816 value = _located("${undefined}", "root.yaml", 5, 10)CODE
HIGHtests/unit_tests/test_yaml_util.py1309 """An empty (null) frontmatter document is treated as no frontmatter."""STRING
HIGHtests/unit_tests/test_cpp_generator.py13 (cg.RawExpression("foo && bar"), "foo && bar"),CODE
HIGHtests/unit_tests/test_cpp_generator.py324 (cg.RawStatement("foo && bar"), "foo && bar"),CODE
HIGHesphome/mqtt.py240 _LOGGER.error("MQTT log topic set to null, can't start MQTT logs")CODE
HIGHesphome/cpp_helpers.py116 cond = "index == 0" if count >= 255 else f"index == 0 || index > {count}"CODE
HIGHesphome/core/config.py230# DEVICE_CLASS_MAX_LENGTH == MAX_DEVICE_CLASS_LENGTH - 1 (C++ includes the null)COMMENT
HIGHesphome/core/entity_helpers.py139 lines.append(f" if (index == 0 || index > {count}) return {empty_var};")CODE
HIGHesphome/core/entity_helpers.py149 f' if (index == 0 || index > {count}) return "";\n'CODE
HIGHesphome/core/entity_helpers.py341 - If !has_own_name && is_name_add_mac_suffix_enabled():STRING
HIGHesphome/components/rp2040_pio_led_strip/light.py90 ; out null, 24 ; discard the byte lane replication of the FIFO since we only need 8 bits (not needed????)CODE
HIGHesphome/components/uart/__init__.py353 # - Serial (UART0): TX=1 or null, RX=3 or nullCOMMENT
HIGHesphome/components/uart/__init__.py354 # - Serial (UART0 swap): TX=15 or null, RX=13 or nullCOMMENT
HIGHesphome/components/uart/__init__.py355 # - Serial1: TX=2 or null, RX=8 or nullCOMMENT
Excessive Try-Catch Wrapping64 hits · 93 pts
SeverityFileLineSnippetContext
MEDIUMtests/integration/conftest.py563 print(f"Error reading from PTY: {result[0]}", file=sys.stderr)CODE
LOWtests/integration/test_syslog.py113 except Exception: # noqa: BLE001CODE
LOWtests/integration/test_udp.py83 except Exception: # noqa: BLE001CODE
LOWtests/integration/test_online_image_bmp.py51 except Exception as exc:CODE
MEDIUMtests/integration/test_online_image_bmp.py22def handler(reader, writer):CODE
LOWscript/merge_component_configs.py485 except Exception as e: # noqa: BLE001CODE
MEDIUMscript/merge_component_configs.py486 print(f"Error merging configs: {e}", file=sys.stderr)CODE
MEDIUMscript/ci_add_metadata_to_json.py43 print(f"Error: JSON file not found: {args.json_file}", file=sys.stderr)CODE
MEDIUMscript/ci_add_metadata_to_json.py50 print(f"Error loading JSON: {e}", file=sys.stderr)CODE
MEDIUMscript/ci_add_metadata_to_json.py57 print("Error: --components must be a JSON array", file=sys.stderr)CODE
MEDIUMscript/ci_add_metadata_to_json.py68 print(f"Error parsing components: {e}", file=sys.stderr)CODE
MEDIUMscript/ci_add_metadata_to_json.py81 print(f"Error writing JSON: {e}", file=sys.stderr)CODE
LOWscript/build_helpers.py114 except Exception: # noqa: BLE001CODE
MEDIUMscript/build_helpers.py402 print(f"Error compiling {label} for {', '.join(components)}")CODE
LOWscript/build_helpers.py404 except Exception as e: # noqa: BLE001CODE
MEDIUMscript/build_helpers.py405 print(f"Error compiling {label} for {', '.join(components)}: {e}")CODE
MEDIUMscript/build_helpers.py485 print(f"Error obtaining platform components: {e}")CODE
LOWscript/stress_test_connect.py24 except Exception as e: # noqa: BLE001CODE
LOWscript/ci-custom.py128 except Exception:CODE
LOWscript/analyze_component_buses.py138 except Exception: # noqa: BLE001 # pylint: disable=broad-exception-caughtCODE
LOWscript/analyze_component_buses.py174 except Exception: # noqa: BLE001 # pylint: disable=broad-exception-caughtCODE
LOWscript/analyze_component_buses.py232 except Exception: # noqa: BLE001 # pylint: disable=broad-exception-caughtCODE
MEDIUMscript/analyze_component_buses.py341 print(f"Error: {tests_dir} does not exist", file=sys.stderr)CODE
MEDIUMscript/ci_memory_impact_comment.py655 print("Error: Failed to load PR analysis JSON", file=sys.stderr)CODE
LOWscript/test_build_components.py509 except Exception as e: # pylint: disable=broad-exception-caughtCODE
MEDIUMscript/test_build_components.py510 print(f"Error merging configs for {components}: {e}")CODE
LOWscript/helpers.py264 except Exception: # noqa: BLE001 - never let a bad test config crash groupingCODE
LOWscript/helpers.py486 except Exception as e:CODE
MEDIUMscript/split_components_for_ci.py251 print(f"Error parsing components JSON: {e}", file=sys.stderr)CODE
MEDIUMscript/split_components_for_ci.py264 print(f"Error parsing directly-changed JSON: {e}", file=sys.stderr)CODE
LOWscript/test_component_grouping.py66 except Exception as e: # noqa: BLE001CODE
MEDIUMscript/test_component_grouping.py67 print(f"Error running test: {e}")CODE
LOWesphome/config.py1350 except Exception:CODE
LOWesphome/storage_json.py285 except Exception: # noqa: BLE001 # pylint: disable=broad-exceptCODE
LOWesphome/storage_json.py387 except Exception: # noqa: BLE001 # pylint: disable=broad-exceptCODE
LOWesphome/storage_json.py416 except Exception: # noqa: BLE001 # pylint: disable=broad-exceptCODE
MEDIUMesphome/storage_json.py381def last_update_check(self) -> datetime | None:CODE
LOWesphome/util.py274 except Exception as err: # noqa: BLE001 # pylint: disable=broad-exceptCODE
LOWesphome/util.py321 except Exception as err: # noqa: BLE001 # pylint: disable=broad-exceptCODE
LOWesphome/framework_helpers.py632 except Exception as e: # noqa: BLE001 # pylint: disable=broad-exception-caughtCODE
LOWesphome/vscode.py137 except Exception as err: # noqa: BLE001 # pylint: disable=broad-exceptCODE
LOWesphome/vscode.py144 except Exception: # noqa: BLE001 # pylint: disable=broad-exceptCODE
LOWesphome/compiled_config.py46 except Exception as err: # noqa: BLE001 # pylint: disable=broad-exceptCODE
LOWesphome/compiled_config.py65 except Exception: # noqa: BLE001 # pylint: disable=broad-exceptCODE
LOWesphome/zeroconf.py339 except Exception as err: # noqa: BLE001 # pylint: disable=broad-exceptCODE
LOWesphome/loader.py276 except Exception: # pylint: disable=broad-exceptCODE
LOWesphome/async_thread.py45 except Exception as exc: # noqa: BLE001 # pylint: disable=broad-exceptCODE
MEDIUMesphome/async_thread.py42def _runner(self) -> None:CODE
LOWesphome/__main__.py1008 except Exception: # noqa: BLE001 # pylint: disable=broad-exceptCODE
LOWesphome/__main__.py1924 except Exception as e: # noqa: BLE001 # pylint: disable=broad-exceptCODE
LOWesphome/platformio/runner.py97 except Exception: # noqa: BLE001CODE
MEDIUMesphome/components/esp32/__init__.py1047def _parse_pio_platform_version(value):CODE
LOWesphome/components/esp32/__init__.py3086 except Exception: # noqa: BLE001 # pylint: disable=broad-exceptCODE
LOWesphome/components/esp8266/__init__.py490 except Exception: # noqa: BLE001 # pylint: disable=broad-exceptCODE
MEDIUMesphome/components/esp8266/__init__.py192def _parse_platform_version(value):CODE
LOWesphome/components/ili9xxx/display.py285 except Exception as e:CODE
LOWesphome/components/sdl/display.py45 except Exception as e:CODE
MEDIUMesphome/components/rp2/generate_boards.py192 print(f"Error: {arduino_pico_path}/tools/json not found", file=sys.stderr)CODE
LOWesphome/components/nrf52/__init__.py707 except Exception as err: # noqa: BLE001 # pylint: disable=broad-exceptCODE
LOWesphome/components/bme68x_bsec2/__init__.py174 except Exception as e:CODE
4 more matches not shown…
Docstring Block Structure16 hits · 80 pts
SeverityFileLineSnippetContext
HIGHtests/integration/state_utils.py30Subscribe to states and wait for one matching ``predicate``. Resolves with the first :class:`EntityState` for whichSTRING
HIGHtests/integration/state_utils.py94Find an entity or raise AssertionError if not found. Args: entities: List of entity info objects from the ASTRING
HIGHscript/merge_component_configs.py184Deduplicate list items with the same ID. Identical items sharing an ID (e.g. a shared bus from a common package pulSTRING
HIGHscript/determine-jobs.py304Determine if clang-tidy should run based on changed files. This function is used by the CI workflow to intelligentlSTRING
HIGHscript/determine-jobs.py927Determine memory impact analysis configuration. Always runs memory impact analysis when there are changed componentSTRING
HIGHscript/analyze_component_buses.py147Check if a component is a platform component (abstract base class). Platform components have IS_PLATFORM_COMPONENT STRING
HIGHscript/ci_memory_impact_comment.py29Run a gh CLI command with error handling. Args: args: Command arguments (including 'gh') operation:STRING
HIGHscript/ci_memory_impact_comment.py461Find existing memory impact comment on the PR. Args: pr_number: PR number Returns: Comment numSTRING
HIGHesphome/bundle.py423Extract a bundle archive and return the path to the config YAML. Sanity checks reject path traversal, symlinks, absSTRING
HIGHesphome/bundle.py474Read and validate the manifest from a bundle without full extraction. Args: bundle_path: Path to the .tar.gSTRING
HIGHesphome/framework_helpers.py63 Remove a directory and its contents recursively if it exists. Args: directory: Path to the directory tSTRING
HIGHesphome/framework_helpers.py197 Create a Python virtual environment. Args: root: Path to the virtual environment directory msgSTRING
HIGHesphome/framework_helpers.py561 Download file from multiple mirrors with substitution support. Args: mirrors: list of mirror URLs STRING
HIGHesphome/analyze_memory/__init__.py609Build mapping from heuristic pattern categories to discovered libraries. Heuristic categories like ``mdns_lib``STRING
HIGHesphome/espidf/framework.py235 Get the ESP-IDF version from the specified framework root. Args: idf_framework_root: Path to the ESP-ISTRING
HIGHesphome/espidf/framework.py275 Get ESP-IDF tool paths and environment variables needed for building. Args: idf_framework_root: Path tSTRING
AI Slop Vocabulary17 hits · 38 pts
SeverityFileLineSnippetContext
LOWtests/unit_tests/core/test_entity_helpers.py166 # Empty name is handled specially - it doesn't just use sanitize(snake_case(""))COMMENT
MEDIUMtests/integration/test_script_queued.py19 """Test comprehensive queued script functionality."""STRING
MEDIUMtests/script/test_determine_jobs.py987 # Workflow / harness filesCOMMENT
LOWscript/merge_component_configs.py232 # No ID, just add itCOMMENT
MEDIUMscript/determine-jobs.py504# - script/test_build_components.py -- the harness the job invokesCOMMENT
MEDIUMscript/list-components.py65 # BUT only for --changed (used by clang-tidy for comprehensive checking)COMMENT
MEDIUMscript/list-components.py91 # This is for --changed (clang-tidy) which needs comprehensive checkingCOMMENT
MEDIUM.github/workflows/ci.yml797 # (no --all-headers; the comprehensive esp32-idf pass covers the shared tree).COMMENT
MEDIUMesphome/components/opentherm/opentherm_macros.h156// These macros utilize the structure of *_LIST macros in orderCOMMENT
MEDIUMesphome/components/epaper_spi/models/jd79660.py59# Device may have specific factory provisioned MTP content to facilitate vendor register features like fast init.COMMENT
LOWesphome/components/epaper_spi/models/__init__.py63 # Explicit dimensions, just use as isCOMMENT
MEDIUMesphome/components/shelly_dimmer/shelly_dimmer.cpp54// Essentially std::size() for pre c++17COMMENT
LOWesphome/components/esp32_ble_server/__init__.py578 # Static value - just set it directly without action infrastructureCOMMENT
LOWesphome/components/mipi/__init__.py449 # Explicit dimensions, just use as isCOMMENT
LOWesphome/components/substitutions/__init__.py334 # This node does not define any vars itself, so just return parent contextCOMMENT
LOWesphome/components/mipi_spi/display.py131 # No exact divisor, just use the closest.COMMENT
MEDIUMesphome/components/lvgl/animation.py58# It would be better to have a more robust way of passing arguments to the timing classes.COMMENT
Structural Annotation Overuse13 hits · 28 pts
SeverityFileLineSnippetContext
LOWtests/component_tests/motion/test_motion.py611 # Step 1: Device flat — gravity in enclosure frame is [0, 0, 1]COMMENT
LOWtests/component_tests/motion/test_motion.py621 # Step 2: Tilt enclosure around Y by 20°COMMENT
LOWesphome/components/epaper_spi/models/weact_bwr.py33 # Step 1: Software Reset (0x12) - REQUIRED per SSD1680, but works without it as well, so it's commented out COMMENT
LOWesphome/components/epaper_spi/models/weact_bwr.py35 # Step 2: Wait 10ms after SWRESET (?) not sure how to implement wht waiting for 10ms after SWRESET, so it's COMMENT
LOWesphome/components/epaper_spi/models/weact_bwr.py36 # Step 3: DRV_OUT_CTL - driver output control (height-dependent)COMMENT
LOWesphome/components/epaper_spi/models/weact_bwr.py39 # Step 4: DATA_ENTRY - data entry mode (0x03 = decrement Y, increment X)COMMENT
LOWesphome/components/epaper_spi/models/weact_bwr.py41 # Step 5: BORDER_FULL - border waveform controlCOMMENT
LOWesphome/components/epaper_spi/models/weact_bwr.py43 # Step 6: TEMP_SENS - internal temperature sensorCOMMENT
LOWesphome/components/epaper_spi/models/weact_bwr.py45 # Step 7: DISPLAY_UPDATE - display update controlCOMMENT
LOWesphome/components/async_tcp/async_tcp_socket.h17/// NOTE: This class is NOT thread-safe. All methods must be called from the main loop.COMMENT
LOWesphome/components/sen6x/sen6x.cpp77 // Step 1: Read serial number (~25ms with I2C delay)COMMENT
LOWesphome/components/sen6x/sen6x.cpp87 // Step 2: Read product name in next loop iterationCOMMENT
LOWesphome/components/sen6x/sen6x.cpp134 // Step 3: Read firmware version and start measurements in next loop iterationCOMMENT
Verbosity Indicators12 hits · 26 pts
SeverityFileLineSnippetContext
LOWtests/component_tests/motion/test_motion.py611 # Step 1: Device flat — gravity in enclosure frame is [0, 0, 1]COMMENT
LOWtests/component_tests/motion/test_motion.py621 # Step 2: Tilt enclosure around Y by 20°COMMENT
LOWesphome/components/epaper_spi/models/weact_bwr.py33 # Step 1: Software Reset (0x12) - REQUIRED per SSD1680, but works without it as well, so it's commented out COMMENT
LOWesphome/components/epaper_spi/models/weact_bwr.py35 # Step 2: Wait 10ms after SWRESET (?) not sure how to implement wht waiting for 10ms after SWRESET, so it's COMMENT
LOWesphome/components/epaper_spi/models/weact_bwr.py36 # Step 3: DRV_OUT_CTL - driver output control (height-dependent)COMMENT
LOWesphome/components/epaper_spi/models/weact_bwr.py39 # Step 4: DATA_ENTRY - data entry mode (0x03 = decrement Y, increment X)COMMENT
LOWesphome/components/epaper_spi/models/weact_bwr.py41 # Step 5: BORDER_FULL - border waveform controlCOMMENT
LOWesphome/components/epaper_spi/models/weact_bwr.py43 # Step 6: TEMP_SENS - internal temperature sensorCOMMENT
LOWesphome/components/epaper_spi/models/weact_bwr.py45 # Step 7: DISPLAY_UPDATE - display update controlCOMMENT
LOWesphome/components/sen6x/sen6x.cpp77 // Step 1: Read serial number (~25ms with I2C delay)COMMENT
LOWesphome/components/sen6x/sen6x.cpp87 // Step 2: Read product name in next loop iterationCOMMENT
LOWesphome/components/sen6x/sen6x.cpp134 // Step 3: Read firmware version and start measurements in next loop iterationCOMMENT
Modern Structural Boilerplate23 hits · 22 pts
SeverityFileLineSnippetContext
LOWtests/testing_helpers.py57def set_testing_manifest(domain: str, manifest: ComponentManifestOverride) -> None:CODE
LOWtests/unit_tests/test_preferences.py26def _set_platform(platform: str) -> None:CODE
LOWtests/unit_tests/test_preferences.py30def _set_esp32(variant: str) -> None:CODE
LOWtests/unit_tests/test_compiled_config.py87def _set_cache_mtime(cache_path: Path, yaml_path: Path, *, offset: int) -> None:CODE
LOWtests/unit_tests/test_git.py22def _setup_old_repo(repo_dir: Path, days_old: int = 2) -> None:CODE
LOWtests/unit_tests/test_config_validation.py1397def _set_core_target(platform: str, framework: str) -> None:CODE
LOWtests/unit_tests/test_config_validation.py1405def _set_framework_version(platform: str, framework: str, version: cv.Version) -> None:CODE
LOWtests/unit_tests/test_config_validation.py602def _setup_core_for_framework(platform: str, framework: str) -> None:CODE
LOWtests/component_tests/mipi_rgb/test_mipi_rgb_config.py41def _set_s3(set_core_config: SetCoreConfigCallable) -> None:CODE
LOWtests/component_tests/time/test_init.py43def _set_platform(platform: Platform) -> None:CODE
LOWscript/ci_memory_impact_comment.py526def update_existing_comment(comment_id: str, comment_body: str) -> None:CODE
LOWesphome/yaml_util.py195 def set_context(self, vars: dict[str, Any]) -> None:CODE
LOWesphome/writer.py135def update_storage_json() -> None:CODE
LOWesphome/cpp_generator.py716def set_cpp_standard(standard: str) -> None:CODE
LOWesphome/core/entity_helpers.py416async def _setup_entity_impl(var: MockObj, config: ConfigType, platform: str) -> None:CODE
LOWesphome/components/image/__init__.py117 def set_big_endian(self, big_endian: bool) -> None:CODE
LOWesphome/components/esp32/__init__.py2006async def _set_libc_picolibc_newlib_compat() -> None:CODE
LOWesphome/components/esp32/__init__.py2039 def set_opt(name: str, value: SdkconfigValueType) -> None:CODE
LOWesphome/components/nrf52/clang_tidy.py154def _setup_core(work_dir: Path) -> None:CODE
LOWesphome/components/esp32_ble/__init__.py272__all__ = [CODE
LOWesphome/components/lvgl/defines.py135def set_widgets_completed(value: bool) -> None:CODE
LOWesphome/components/lvgl/widgets/__init__.py552def _set_layout_options(w: Widget, layout: dict, base_name: str | None) -> None:CODE
LOWesphome/espidf/clang_tidy.py142def _setup_core(work_dir: Path, settings: _Settings) -> None:STRING
AI Response Leakage1 hit · 8 pts
SeverityFileLineSnippetContext
HIGHesphome/components/weikai/weikai.h56/// problem by asking users to rewrite their code, I have implemented this ring buffer that store the bytes receivedCOMMENT
Fake / Example Data6 hits · 5 pts
SeverityFileLineSnippetContext
LOWtests/unit_tests/components/test_rp2_generate_boards.py254 _add_board(arduino_pico, "placeholder", pins_header=header)STRING
LOWtests/unit_tests/components/test_rp2_generate_boards.py258 assert "SDA1" not in board_pins["placeholder"]STRING
LOWtests/unit_tests/components/test_rp2_generate_boards.py259 assert "SCL1" not in board_pins["placeholder"]STRING
LOWtests/unit_tests/components/test_rp2_generate_boards.py260 assert board_pins["placeholder"]["LED"] == 25STRING
LOWtests/unit_tests/components/test_rp2_generate_boards.py261 assert "max_virtual_pin" not in boards["placeholder"]STRING
LOWesphome/components/runtime_image/__init__.py19CONF_PLACEHOLDER = "placeholder"CODE
Slop Phrases1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUM.github/workflows/codeql.yml51 # If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize hCOMMENT
AI Structural Patterns3 hits · 3 pts
SeverityFileLineSnippetContext
LOWesphome/coroutine.py269CODE
LOWesphome/coroutine.py189CODE
LOWesphome/components/sensor/__init__.py365CODE
Example Usage Blocks1 hit · 2 pts
SeverityFileLineSnippetContext
LOWesphome/components/sha256/sha256.h46/// Example usage:COMMENT
TODO Padding1 hit · 2 pts
SeverityFileLineSnippetContext
LOWesphome/components/rp2/gpio.cpp96 // TODO: implementCOMMENT