Excessibility.TelemetryCapture.Analyzers.HandleEventNoop (Excessibility v0.14.0)

View Source

Detects handle_event calls that don't modify state.

A noop handle_event may indicate:

  • Unnecessary event handlers
  • Missing state updates
  • Events that should use phx-throttle/phx-debounce

Output

%{
  findings: [
    %{
      severity: :warning,
      message: "handle_event:validate called 5x with no state changes - consider phx-throttle or phx-debounce",
      events: [],
      metadata: %{event_name: "validate", count: 5}
    }
  ],
  stats: %{
    handle_event_count: 10,
    noop_count: 5,
    noop_by_event: %{"validate" => 5}
  }
}

Summary

Functions

analyze(map, opts)

Callback implementation for Excessibility.TelemetryCapture.Analyzer.analyze/2.

default_enabled?()

Callback implementation for Excessibility.TelemetryCapture.Analyzer.default_enabled?/0.

name()

Callback implementation for Excessibility.TelemetryCapture.Analyzer.name/0.