Checkstyle: Detect package names ending with ss as singular

This commit is contained in:
Player 2020-09-09 03:14:01 +00:00 committed by GitHub
parent facf3bbf67
commit d86a720d2c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -173,7 +173,7 @@
- net.fabricmc.fabric.(impl|mixin).server.<module-name>[.<extra packages...>]
- net.fabricmc.fabric.(impl|mixin).<module-name>[.<extra packages...>]
- <any legacy package>
where <module-name> is a set of '.'-separated words, all in singular (not ending with s) and not starting with client. or server.
where <module-name> is a set of '.'-separated words, all in singular (not ending with s except for ss) and not starting with client. or server.
and <version> is a positive integer (1, 2, 3, ...)
and <extra packages...> is a set of '.'-separated words with all the first potentially containing digits.
Negative lookahead ensures that client/server can't be replaced with common disguised as the module name.
@ -187,7 +187,7 @@
- largely unconstained trailing subpackages
-->
<property name="format"
value="^net\.fabricmc\.fabric\.(api(?!\.common\.)(\.client|\.server|)(\.(?!client\.|server\.)[a-z]+[a-rt-z])+\.v[1-9][0-9]*|(impl|mixin|test)(?!\.common\.)(\.client|\.server|)(\.(?!client\.|server\.)[a-z]+[a-rt-z])+|api\.(event|util|biomes\.v1|registry|client\.screen|container|block|entity|client\.itemgroup|client\.keybinding|tag|tools|client\.model|network|server|client\.render|resource|client\.texture))(|\.[a-z]+(\.[a-z0-9]+)*)$"/>
value="^net\.fabricmc\.fabric\.(api(?!\.common\.)(\.client|\.server|)(\.(?!client\.|server\.)[a-z]+([a-rt-z]|ss))+\.v[1-9][0-9]*|(impl|mixin|test)(?!\.common\.)(\.client|\.server|)(\.(?!client\.|server\.)[a-z]+[a-rt-z])+|api\.(event|util|biomes\.v1|registry|client\.screen|container|block|entity|client\.itemgroup|client\.keybinding|tag|tools|client\.model|network|server|client\.render|resource|client\.texture))(|\.[a-z]+(\.[a-z0-9]+)*)$"/>
</module>
<!--<module name="InvalidJavadocPosition"/>-->