forked from checkstyle/checkstyle
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue checkstyle#13345: enable test for AvoidNoArgumentSuperConstruct…
…orCallCheck
- Loading branch information
Showing
5 changed files
with
48 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
...ppycrawl/tools/checkstyle/checks/coding/avoidnoargumentsuperconstructorcall/Example1.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/*xml | ||
<module name="Checker"> | ||
<module name="TreeWalker"> | ||
<module name="AvoidNoArgumentSuperConstructorCall"/> | ||
</module> | ||
</module> | ||
*/ | ||
package com.puppycrawl.tools.checkstyle.checks.coding.avoidnoargumentsuperconstructorcall; | ||
|
||
// xdoc section -- start | ||
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 | ||
} | ||
} | ||
// xdoc section -- end |
23 changes: 0 additions & 23 deletions
23
...uppycrawl/tools/checkstyle/checks/coding/avoidnoargumentsuperconstructorcall/Example1.txt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters