Checkstyle: Package declarations (#33784)
Make sure that all java files have a package declaration and that all of the package declarations line up with the directory structure. This would have caught the bug that I caused in190ea9a6de
and fixed inb6d68bd805
.
This commit is contained in:
parent
91e45ca21b
commit
bc12a948b5
|
@ -62,7 +62,13 @@
|
|||
-->
|
||||
<module name="ModifierOrder" />
|
||||
|
||||
<!-- Checks that we don't include modifier where they are implied. For
|
||||
example, this does not allow interface methods to be declared public
|
||||
because they are *always* public. -->
|
||||
<module name="RedundantModifier" />
|
||||
<!-- Checks that all java files have a package declaration and that it
|
||||
lines up with the directory structure. -->
|
||||
<module name="PackageDeclaration"/>
|
||||
|
||||
<!-- We don't use Java's builtin serialization and we suppress all warning
|
||||
about it. The flip side of that coin is that we shouldn't _try_ to use
|
||||
|
|
|
@ -17,6 +17,10 @@
|
|||
<!-- the constructors on some local classes in these tests must be public-->
|
||||
<suppress files="server[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]plugins[/\\]PluginsServiceTests.java" checks="RedundantModifier" />
|
||||
|
||||
<!-- Intentionally doesn't have a package declaration to test logging
|
||||
configuration of classes that aren't in packages. -->
|
||||
<suppress files="test[/\\]framework[/\\]src[/\\]test[/\\]java[/\\]Dummy.java" checks="PackageDeclaration" />
|
||||
|
||||
<!-- Hopefully temporary suppression of LineLength on files that don't pass it. We should remove these when we the
|
||||
files start to pass. -->
|
||||
<suppress files="client[/\\]rest[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]client[/\\]HeapBufferedAsyncResponseConsumerTests.java" checks="LineLength" />
|
||||
|
|
Loading…
Reference in New Issue