Bandera.Dashboard.Similarity (bandera v0.5.0)

Copy Markdown View Source

Pure helper for detecting suspiciously similar flag names in the dashboard. Uses Jaro distance to surface flag pairs that may be typos of each other.

Summary

Functions

Returns [{atom, atom, float}] pairs where the Jaro distance between the two flag name strings is >= 0.95.

Functions

similar_pairs(flag_names)

@spec similar_pairs([atom()]) :: [{atom(), atom(), float()}]

Returns [{atom, atom, float}] pairs where the Jaro distance between the two flag name strings is >= 0.95.

Each pair is emitted once (a <= b lexicographically). Self-pairs are excluded.

Assumes flag_names contains distinct atoms. Duplicate atoms in the input are treated as self-pairs and excluded.