Since Checkstyle 8.29
super();
See
specification for detailed information.
To configure the check:
<module name="Checker"> <module name="TreeWalker"> <module name="AvoidNoArgumentSuperConstructorCall"/> </module> </module>
Example of violations
class SuperClass { public SuperClass() {} public SuperClass(int arg) {} } class Example1 extends SuperClass { Example1() { super(); // violation } Example1(int arg) { super(arg); // ok, explicit constructor invocation with argument } Example1(long arg) { // ok, no explicit constructor invocation } }
All messages can be customized if the default message doesn't suit you. Please see the documentation to learn how to.
com.puppycrawl.tools.checkstyle.checks.coding