Skip to content

excessive-visibility lint doesn't flag unused public methods #1207

Description

@yegor256

Consider this object:

[t] > phrase
  pos.gte 0 > multi-words
  t.index-of " " > pos

  (book "Object Thinking").multi-words ++> can-find-space-in-name

Here, the pos is not used by any tests. It can and should be made private:

[t] > phrase
  pos.gte 0 > multi-words
  t.index-of " " >> pos
                ^^^^
                here

Let's create a lint that would catch this. If no tests refer to a method, it must be private/obfuscated (>>).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestgood-titleThe title was checked and improved by ChatGPThelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions