2014-11-15 03:27:39 +08:00
<?xml version="1.0"?>
< !DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
Add new experimental snapshot API (#524)
* Add new experimental snapshot API
This API intends to replace the existing snapshot API in WorldEdit 8.
It is currently experimental, and the old API is soft-deprecated. Once
it is determined to be stable, the old API will be removed and replaced
with this new one.
It uses TrueVFS instead of TrueZIP, due to the latter's status as
matinence-only, and the face that TrueVFS is NIO-FileSystem compatible,
allowing us to integrate it with NIO's native zipfs. The TrueVFS system
does encompass multiple modules, but users and download + install
truevfs-profile-default as a fatjar. We depend on that profile to show
this as the intended solution.
* Port commands to experimental snapshots. Legacy ones are in sibling classes.
* Add many tests, fix bugs
* Clean up imports
* Verify sorting behaviors, fix bugs
* Add license to test
* Add support for DIM region folders
* Fix tests for Windows paths
* Rewrite tests for even more coverage, fix bugs
* Clean up naming on tests
* Add test for legacy format
* Stop trying to abuse `file://`, use `snapfs:` instead
* Simplify iterPaths
* Use File.separator in FS snap tests
* Fix some bugs from T9N PR (#538)
* Use printInfo/printError to keep colors right
* Escape quotes before they go in the map
* I18N-ify new snapshot code
2019-12-16 19:00:12 +08:00
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
2020-07-07 14:08:17 +08:00
2014-11-15 03:27:39 +08:00
<!--
Checks based on Google Checks, modified for EngineHub.
-->
2020-07-07 14:08:17 +08:00
2014-11-15 03:27:39 +08:00
<module name= "Checker" >
<property name= "charset" value= "UTF-8" />
2020-07-07 14:08:17 +08:00
2014-11-15 03:27:39 +08:00
<property name= "severity" value= "error" />
2020-07-07 14:08:17 +08:00
2014-11-15 03:27:39 +08:00
<property name= "fileExtensions" value= "java, properties, xml" />
<!-- Checks for whitespace -->
<!-- See http://checkstyle.sf.net/config_whitespace.html -->
<module name= "FileTabCharacter" >
2019-05-01 15:12:20 +08:00
<property name= "eachLine" value= "true" />
2014-11-15 03:27:39 +08:00
</module>
2020-07-07 19:46:49 +08:00
2014-11-15 03:27:39 +08:00
<module name= "TreeWalker" >
<module name= "OuterTypeFilename" />
2019-04-30 13:40:32 +08:00
<module name= "IllegalTokenText" >
2014-11-15 03:27:39 +08:00
<property name= "tokens" value= "STRING_LITERAL, CHAR_LITERAL" />
2019-05-01 15:12:20 +08:00
<property name= "format"
2020-03-08 14:09:36 +08:00
value="\\u00(08|09|0(a|A)|0(c|C)|0(d|D)|22|27|5(C|c))|\\(0(10|11|12|14|15|42|47)|134)"/>
2014-11-15 03:27:39 +08:00
<property name= "message" value= "Avoid using corresponding octal or Unicode escape." />
</module>
<module name= "AvoidEscapedUnicodeCharacters" >
2019-05-01 15:12:20 +08:00
<property name= "allowEscapesForControlCharacters" value= "true" />
<property name= "allowByTailComment" value= "true" />
2014-11-15 03:27:39 +08:00
<property name= "allowNonPrintableEscapes" value= "true" />
</module>
<module name= "AvoidStarImport" />
<module name= "OneTopLevelClass" />
<module name= "NoLineWrap" />
<module name= "EmptyBlock" >
2019-05-01 15:12:20 +08:00
<property name= "option" value= "TEXT" />
2014-11-15 03:27:39 +08:00
<property name= "tokens" value= "LITERAL_TRY, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE, LITERAL_SWITCH" />
</module>
<module name= "NeedBraces" />
<module name= "RightCurly" />
<module name= "RightCurly" >
2019-05-01 15:12:20 +08:00
<property name= "option" value= "alone" />
2019-04-30 13:40:32 +08:00
<property name= "tokens"
2019-05-01 15:12:20 +08:00
value="CLASS_DEF, METHOD_DEF, CTOR_DEF, LITERAL_FOR, LITERAL_WHILE, STATIC_INIT, INSTANCE_INIT"/>
2014-11-15 03:27:39 +08:00
</module>
2019-04-30 13:40:32 +08:00
<module name= "WhitespaceAround" >
2019-05-01 15:12:20 +08:00
<property name= "allowEmptyConstructors" value= "true" />
<property name= "allowEmptyMethods" value= "true" />
<property name= "allowEmptyTypes" value= "true" />
<property name= "allowEmptyLoops" value= "true" />
2019-03-11 12:02:51 +08:00
<message key= "ws.notFollowed"
2014-11-15 03:27:39 +08:00
value="WhitespaceAround: ''{0}'' is not followed by whitespace. Empty blocks may only be represented as '{}' when not part of a multi-block statement (4.1.3)"/>
2019-03-11 12:02:51 +08:00
<message key= "ws.notPreceded"
2014-11-15 03:27:39 +08:00
value="WhitespaceAround: ''{0}'' is not preceded with whitespace."/>
2019-04-30 13:40:32 +08:00
</module>
<module name= "WhitespaceAfter" >
2019-03-11 12:02:51 +08:00
<message key= "ws.notFollowed"
2019-05-01 15:12:20 +08:00
value="WhitespaceAround: ''{0}'' is not followed by whitespace. (4.1.3)"/>
</module>
2021-02-23 14:05:23 +08:00
<module name= "NoWhitespaceBefore" >
<property name= "tokens" value= "COMMA, POST_INC, POST_DEC, ELLIPSIS, LABELED_STAT" />
</module>
<module name= "NoWhitespaceBefore" >
<property name= "tokens" value= "SEMI" />
<property name= "allowLineBreaks" value= "true" />
</module>
2014-11-15 03:27:39 +08:00
<module name= "OneStatementPerLine" />
<module name= "MultipleVariableDeclarations" />
<module name= "ArrayTypeStyle" />
<module name= "MissingSwitchDefault" />
<module name= "FallThrough" >
2019-05-01 15:12:20 +08:00
<property name= "reliefPattern" value= "FALL-THROUGH|falls?[ -]?thr(u|ough)" />
2014-11-15 03:27:39 +08:00
</module>
<module name= "UpperEll" />
<module name= "ModifierOrder" />
<module name= "EmptyLineSeparator" >
2019-05-01 15:12:20 +08:00
<property name= "allowNoEmptyLineBetweenFields" value= "true" />
2017-08-02 14:01:12 +08:00
</module>
2014-11-15 03:27:39 +08:00
<module name= "SeparatorWrap" >
2019-04-30 13:40:32 +08:00
<property name= "tokens" value= "DOT" />
2019-05-01 15:12:20 +08:00
<property name= "option" value= "nl" />
2017-08-02 14:01:12 +08:00
</module>
2014-11-15 03:27:39 +08:00
<module name= "SeparatorWrap" >
2019-04-30 13:40:32 +08:00
<property name= "tokens" value= "COMMA" />
2020-01-02 03:52:53 +08:00
<property name= "option" value= "EOL" />
2017-08-02 14:01:12 +08:00
</module>
2014-11-15 03:27:39 +08:00
<module name= "PackageName" >
<property name= "format" value= "^[a-z]+(\.[a-z][a-z0-9]*)*$" />
2019-05-01 15:12:20 +08:00
<message key= "name.invalidPattern"
value="Package name ''{0}'' must match pattern ''{1}''."/>
2014-11-15 03:27:39 +08:00
</module>
<module name= "TypeName" >
2019-05-01 15:12:20 +08:00
<message key= "name.invalidPattern"
value="Type name ''{0}'' must match pattern ''{1}''."/>
2017-08-02 14:01:12 +08:00
</module>
2014-11-15 03:27:39 +08:00
<module name= "MemberName" >
2020-03-08 14:09:36 +08:00
<property name= "format" value= "^([a-z][_a-zA-Z0-9]+|[xyz])$" />
2019-05-01 15:12:20 +08:00
<message key= "name.invalidPattern"
value="Member name ''{0}'' must match pattern ''{1}''."/>
2017-08-02 14:01:12 +08:00
</module>
2014-11-15 03:27:39 +08:00
<module name= "ParameterName" >
<property name= "format" value= "^([a-z][a-z0-9][_a-zA-Z0-9]*|[a-z])$" />
2019-05-01 15:12:20 +08:00
<message key= "name.invalidPattern"
value="Parameter name ''{0}'' must match pattern ''{1}''."/>
2017-08-02 14:01:12 +08:00
</module>
2014-11-15 03:27:39 +08:00
<module name= "ClassTypeParameterName" >
<property name= "format" value= "(^[A-Z][0-9]?)$|(^[A-Z][a-zA-Z0-9]*$)" />
2019-05-01 15:12:20 +08:00
<message key= "name.invalidPattern"
value="Class type name ''{0}'' must match pattern ''{1}''."/>
2017-08-02 14:01:12 +08:00
</module>
2014-11-15 03:27:39 +08:00
<module name= "MethodTypeParameterName" >
2019-05-01 15:12:20 +08:00
<property name= "format" value= "(^[A-Z][0-9]?)$|(^[A-Z][a-zA-Z0-9]*$)" />
<message key= "name.invalidPattern"
value="Method type name ''{0}'' must match pattern ''{1}''."/>
2017-08-02 14:01:12 +08:00
</module>
2014-11-15 03:27:39 +08:00
<module name= "NoFinalizer" />
<module name= "GenericWhitespace" >
2019-03-11 12:02:51 +08:00
<message key= "ws.followed"
2014-11-15 03:27:39 +08:00
value="GenericWhitespace ''{0}'' is followed by whitespace."/>
<message key= "ws.preceded"
value="GenericWhitespace ''{0}'' is preceded with whitespace."/>
2019-03-11 12:02:51 +08:00
<message key= "ws.illegalFollow"
2014-11-15 03:27:39 +08:00
value="GenericWhitespace ''{0}'' should followed by whitespace."/>
2019-03-11 12:02:51 +08:00
<message key= "ws.notPreceded"
2014-11-15 03:27:39 +08:00
value="GenericWhitespace ''{0}'' is not preceded with whitespace."/>
2017-08-02 14:01:12 +08:00
</module>
2019-05-01 15:12:20 +08:00
<module name= "Regexp" >
2020-03-08 14:09:36 +08:00
<property name= "format" value= "[ \t]+$" />
2019-05-01 15:12:20 +08:00
<property name= "illegalPattern" value= "true" />
<property name= "message" value= "Trailing whitespace" />
2017-08-02 14:01:12 +08:00
</module>
2014-11-15 03:27:39 +08:00
<module name= "Indentation" >
2019-05-01 15:12:20 +08:00
<property name= "basicOffset" value= "4" />
<property name= "braceAdjustment" value= "0" />
<property name= "caseIndent" value= "4" />
<property name= "throwsIndent" value= "4" />
<property name= "lineWrappingIndentation" value= "4" />
2020-03-08 14:09:36 +08:00
<property name= "arrayInitIndent" value= "4" />
2014-11-15 03:27:39 +08:00
</module>
<module name= "CustomImportOrder" >
2019-05-01 15:12:20 +08:00
<property name= "sortImportsInGroupAlphabetically" value= "true" />
<property name= "customImportOrderRules" value= "THIRD_PARTY_PACKAGE###STANDARD_JAVA_PACKAGE###STATIC" />
2017-08-02 14:01:12 +08:00
</module>
2014-11-15 03:27:39 +08:00
<module name= "MethodParamPad" />
<module name= "OperatorWrap" >
2019-05-01 15:12:20 +08:00
<property name= "option" value= "NL" />
2019-04-30 13:40:32 +08:00
<property name= "tokens"
2019-05-01 15:12:20 +08:00
value="BAND, BOR, BSR, BXOR, DIV, EQUAL, GE, GT, LAND, LE, LITERAL_INSTANCEOF, LOR, LT, MINUS, MOD, NOT_EQUAL, PLUS, QUESTION, SL, SR, STAR "/>
2017-08-02 14:01:12 +08:00
</module>
2019-03-11 12:02:51 +08:00
<module name= "AnnotationLocation" >
2019-05-01 15:12:20 +08:00
<property name= "tokens" value= "CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF" />
2017-08-02 14:01:12 +08:00
</module>
2019-03-11 12:02:51 +08:00
<module name= "AnnotationLocation" >
2019-04-30 13:40:32 +08:00
<property name= "tokens" value= "VARIABLE_DEF" />
2019-05-01 15:12:20 +08:00
<property name= "allowSamelineMultipleAnnotations" value= "true" />
2017-08-02 14:01:12 +08:00
</module>
2014-11-15 03:27:39 +08:00
<module name= "NonEmptyAtclauseDescription" />
<module name= "JavadocTagContinuationIndentation" />
<module name= "SummaryJavadocCheck" >
2020-03-08 14:09:36 +08:00
<property name= "forbiddenSummaryFragments"
2014-11-15 03:27:39 +08:00
value="^@return the *|^This method returns |^A [{]@code [a-zA-Z0-9]+[}]( is a )"/>
2017-08-02 14:01:12 +08:00
</module>
2014-11-15 03:27:39 +08:00
<module name= "JavadocParagraph" />
<module name= "AtclauseOrder" >
2019-05-01 15:12:20 +08:00
<property name= "tagOrder" value= "@param, @return, @throws, @deprecated" />
<property name= "target" value= "CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF, VARIABLE_DEF" />
2017-08-02 14:01:12 +08:00
</module>
2019-03-11 12:02:51 +08:00
<!-- No javadoc for now -->
2014-11-15 03:27:39 +08:00
<!-- <module name="JavadocMethod">
2019-05-01 15:12:20 +08:00
<property name= "scope" value= "public" />
<property name= "allowMissingParamTags" value= "true" />
<property name= "allowMissingThrowsTags" value= "true" />
<property name= "allowMissingReturnTag" value= "true" />
<property name= "minLineCount" value= "2" />
<property name= "allowedAnnotations" value= "Override, Test" />
<property name= "allowThrowsTagsForSubclasses" value= "true" />
2014-11-15 03:27:39 +08:00
</module> -->
<module name= "MethodName" >
<property name= "format" value= "^[a-z][a-z0-9][a-zA-Z0-9_]*$" />
2019-05-01 15:12:20 +08:00
<message key= "name.invalidPattern"
value="Method name ''{0}'' must match pattern ''{1}''."/>
2017-08-02 14:01:12 +08:00
</module>
2014-11-15 03:27:39 +08:00
<module name= "SingleLineJavadoc" >
2019-05-01 15:12:20 +08:00
<property name= "ignoreInlineTags" value= "false" />
2017-08-02 14:01:12 +08:00
</module>
2014-11-15 03:27:39 +08:00
<module name= "EmptyCatchBlock" >
2019-05-01 15:12:20 +08:00
<property name= "exceptionVariableName" value= "expected|ignored" />
2017-08-02 14:01:12 +08:00
</module>
2014-11-15 03:27:39 +08:00
<module name= "CommentsIndentation" />
2019-05-01 15:12:20 +08:00
<!-- Validate String.to(Lower|Upper)Case() calls include Locale argument -->
<module name= "Regexp" >
<property name= "message" value= "Case-conversion calls must include an explicit Locale" />
<property name= "format" value= "(?!Character)\.to(Lower|Upper)Case\(\)" />
<property name= "illegalPattern" value= "true" />
2017-08-02 14:01:12 +08:00
</module>
2014-11-15 03:27:39 +08:00
</module>
2019-04-30 13:40:32 +08:00
<!-- Validate that command annotations are formatted correctly -->
<module name= "RegexpMultiline" >
<property name= "format" value= "^( +)@(Arg|Switch|Command)\(.*?\r?\n\1 {5,}" />
</module>
2020-08-15 18:46:24 +08:00
<module name= "RegexpMultiline" >
<property name= "format" value= "(?s:(\r\n|\r).*)" />
<property name= "message" value= "CRLF and CR line endings are prohibited, but this file uses them." />
</module>
2019-05-01 15:12:20 +08:00
<module name= "SuppressionFilter" >
<property name= "file" value= "${config_loc}/checkstyle-suppression.xml" />
</module>
2017-08-02 14:01:12 +08:00
</module>