How to disable method visibility inspection?

Answered

I am getting some warnings that suggest a change to methods' visibility. I don't want this because:

  • I might just want to leave that method public for obvious purposes, even though that visibility is not needed in project at the moment.
  • There are actually some bugs that suggest you downgrade visibility while the method is actually being called somewhere else, therefore leading to a compilation error.

I am trying to disable this inspection, but I cannot find any option to do this under Settings > Editor > Inspections (not even even under the collapsible "Visibility Issues").

5 comments
Comment actions Permalink

Can we create a feature request to allow suppressing warnings for the whole project (e.g. a property in pom.xml) or for a package (package-info.java)?

New versions of IntelliJ added too much warnings and now I have to put suppresses almost in every class. And I don't want to disable it globally for my IntelliJ installation since other people will see those warnings anyway.

0
Comment actions Permalink

Disable inspections in your project profile.

0
Comment actions Permalink

That's my point - if I do this then it's going to be disabled only for me. We don't commit IDE-specific files into VCS, neither I want to share my settings via other means.

What would be better is to suppress the warning in the sources but more globally than for a class: either for a package or for module or even for the whole project.

0

Please sign in to leave a comment.