Example:
public class Outer {
static class Nested {} // warning
class Inner {} // warning
enum Mode {} // warning depends on the setting
interface I {} // warning depends on the setting
}
Configure the inspection: