fleetlint Policy for a fleet of repositories
v0.8
Getting started

slop/variant-names

No names with version or quality suffixes

Severityinfo
Tiersall
Stacksany
Scoperoot
Kindexpr
Sourcelibrary v0.5.0
Selected byfleetlint-slop@v0.5.0

Requirement

No declaration is a variant of another one that is still declared (parseV2 next to parse, handlerNew next to handler, ClientImproved next to Client). A suffixed name without a declared base (isNew, PolicyV2 alone) is not a finding.

Why

It means two implementations exist and callers must know which one is right.

Check

For each item in:

codegrep("code", r'\b(?:func(?:\s*\([^)]*\))?|fun|def|fn|function|class|struct|interface|type|void|const|final|let|var|val)\s+(\w+?)(?:V[2-9]|_v[2-9]|Improved|Enhanced|Old|New|Fixed|Better)\b')
codegrep("code", r'\b(func(\s*\([^)]*\))?|fun|def|fn|function|class|struct|interface|type|void|const|final|let|var|val)\s+' + item.match + r'\b').size() == 0

Fix

Change the original and update its callers; delete the other.

Agent instruction: Report the pair; merge into the original name only when the callers and tests make the intended behaviour clear.

Sources


Generated by fleetlint docs from catalog v0.5.0.