[Suggestion]Let rule S2333 detect redundant modifiers of interface is recommended

Affects Sonarqube Version:
Sonarqube version:
sonar-scanner version:

S2333: Redundant modifiers should not be used

It is recommended add modifiers checking in the case of interface which is defined in a interface or a class, where public and static modifiers can be ignored.

Code Sample demonstrating the issue:

public interface Foo {
    public static interface Baz {}  // public, static ignored
public class Bar {
    public static interface Baz {}  // static ignored

Expected outcome:

Running Sonarqube through:
command line

Hello @wongwuchiu,

Thanks for the proposition, and sorry for the late reaction.

This improvement makes sense to me, I created a ticket for it: SONARJAVA-3525.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.