embulk-filter-calcite 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (25) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +1 -1
  3. data/CHANGELOG.md +12 -0
  4. data/README.md +7 -0
  5. data/build.gradle +7 -11
  6. data/config/checkstyle/README.md +6 -0
  7. data/config/checkstyle/checkstyle-suppressions.xml +8 -0
  8. data/config/checkstyle/checkstyle.xml +195 -104
  9. data/config/checkstyle/google_checks.xml +218 -0
  10. data/src/main/java/org/embulk/filter/calcite/CalciteFilterPlugin.java +111 -118
  11. data/src/main/java/org/embulk/filter/calcite/PageConverter.java +19 -36
  12. data/src/main/java/org/embulk/filter/calcite/adapter/page/PageEnumerator.java +14 -15
  13. data/src/main/java/org/embulk/filter/calcite/adapter/page/PageFieldType.java +9 -15
  14. data/src/main/java/org/embulk/filter/calcite/adapter/page/PageSchema.java +4 -9
  15. data/src/main/java/org/embulk/filter/calcite/adapter/page/PageSchemaFactory.java +7 -8
  16. data/src/main/java/org/embulk/filter/calcite/adapter/page/PageTable.java +23 -14
  17. data/src/main/java/org/embulk/filter/calcite/getter/FilterColumnGetterFactory.java +23 -11
  18. data/src/main/java/org/embulk/filter/calcite/getter/FilterTimestampColumnGetter.java +10 -14
  19. data/src/test/java/org/embulk/filter/calcite/TestCalciteFilterPlugin.java +81 -55
  20. data/src/test/resources/org/embulk/filter/calcite/test/test_timestamp_conv_expected.csv +4 -0
  21. data/src/test/resources/org/embulk/filter/calcite/test/test_timestamp_conv_filter.yml +3 -0
  22. data/src/test/resources/org/embulk/filter/calcite/test/test_timestamp_conv_in.yml +18 -0
  23. data/src/test/resources/org/embulk/filter/calcite/test/test_timestamp_conv_source.csv +5 -0
  24. metadata +14 -7
  25. data/config/checkstyle/default.xml +0 -108
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a72ba31671d8572762457c6fede3f290ab0a81c2
4
- data.tar.gz: dde80b10ba7bb64b85174a5469de93db29f89200
3
+ metadata.gz: ea4ee3ab6303bec568a675a5be2854734b555aca
4
+ data.tar.gz: a9508c8f413308b9df668e95c74bcfd998e4b6b9
5
5
  SHA512:
6
- metadata.gz: 27bc215b3a74a4011271d3e082744f5eedccaa19405a2adf878e8aad0688d624f1f24b02d21a2beb1ff59e409b770b1f7fa6810ef89389ec91c96afd5df1d1d6
7
- data.tar.gz: cc83d78f01ca54a125f39598db233a7acee8eb690e54bd069d290b318c409515fb7678f5b579817747b2ad616b51568530b892ff50ff5e69ce137849aa9e8ad7
6
+ metadata.gz: 132a5257822499c80b5e5b34480a1075e50e5dbc840a37d33238c8d14e22324e794843d7397f87dfd0d083a48f0b99ab9e3b4fdf80cd7effc363fa49457b1113
7
+ data.tar.gz: e54a39e9c088c4d861ba22427e9101b32e6bcc8be2685b4627850f2b30c3cdfb2b3625a390622a61b8129af034d65022f4d696f5c7cfc2b00edd0a5fccd8a3a8
@@ -1,4 +1,4 @@
1
1
  language: java
2
- jdk: oraclejdk7
2
+ jdk: oraclejdk8 # Use oraclejdk8 because checkstyle jar is compiled by jdk8 but, released plugin is still built by oraclejdk7.
3
3
  script:
4
4
  - ./gradlew --info check jacocoTestReport
@@ -1,3 +1,15 @@
1
+ ## 0.1.2 - 2017-05-15
2
+
3
+ * [new feature] Add warning to change default of case sensitive. [#18]
4
+
5
+ * [new feature] Add 'options' option to configure JDBC properties. [#17]
6
+
7
+ * [maintenance] Upgrade Apache Calcite 1.12.0. [#20]
8
+
9
+ * [maintenance] Deduplicate Jdbc URL logging. [#16]
10
+
11
+ * [maintenance] Change with google style. [#14]
12
+
1
13
  ## 0.1.1 - 2017-03-22
2
14
 
3
15
  * [bug fix] Use default_timezone option to configure JDBC connection timeZone param [#11](https://github.com/muga/embulk-filter-calcite/pull/11)
data/README.md CHANGED
@@ -45,6 +45,13 @@ filters:
45
45
  query: SELECT * FROM $PAGES WHERE id IN (1, 2)
46
46
  ```
47
47
 
48
+ The following is an example by LIKE operator and enables removing rows not matched at a specified pattern from Pages.
49
+ ```yaml
50
+ filters:
51
+ - type: calcite
52
+ query: SELECT * FROM $PAGES WHERE message LIKE '%EMBULK%'
53
+ ```
54
+
48
55
  This enables adding new column and inserting the value combined 2 string column values.
49
56
  ```yaml
50
57
  filters:
@@ -17,7 +17,7 @@ configurations {
17
17
  provided
18
18
  }
19
19
 
20
- version = "0.1.1"
20
+ version = "0.1.2"
21
21
 
22
22
  sourceCompatibility = 1.7
23
23
  targetCompatibility = 1.7
@@ -26,7 +26,7 @@ dependencies {
26
26
  compile "org.embulk:embulk-core:0.8.17"
27
27
  provided "org.embulk:embulk-core:0.8.17"
28
28
  compile "org.embulk.input.jdbc:embulk-input-jdbc:0.8.2"
29
- compile "org.apache.calcite:calcite-core:1.11.0"
29
+ compile "org.apache.calcite:calcite-core:1.12.0"
30
30
 
31
31
  testCompile "junit:junit:4.+"
32
32
  testCompile "org.embulk:embulk-core:0.8.17:tests"
@@ -41,22 +41,18 @@ task classpath(type: Copy, dependsOn: ["jar"]) {
41
41
  }
42
42
  clean { delete "classpath" }
43
43
 
44
+ def checkstyleConfigDir = new File(rootDir, "/config/checkstyle")
44
45
  checkstyle {
45
- configFile = file("${project.rootDir}/config/checkstyle/checkstyle.xml")
46
- toolVersion = '6.14.1'
47
- }
48
- checkstyleMain {
49
- configFile = file("${project.rootDir}/config/checkstyle/default.xml")
50
- ignoreFailures = true
51
- }
52
- checkstyleTest {
53
- configFile = file("${project.rootDir}/config/checkstyle/default.xml")
46
+ configFile = new File(checkstyleConfigDir, "checkstyle.xml")
47
+ configProperties.checkstyleConfigDir = checkstyleConfigDir
48
+ toolVersion = '7.6.1'
54
49
  ignoreFailures = true
55
50
  }
56
51
  task checkstyle(type: Checkstyle) {
57
52
  classpath = sourceSets.main.output + sourceSets.test.output
58
53
  source = sourceSets.main.allJava + sourceSets.test.allJava
59
54
  }
55
+ check.dependsOn('checkstyle')
60
56
 
61
57
  tasks.withType(FindBugs) {
62
58
  reports {
@@ -0,0 +1,6 @@
1
+ * google_check.xml: Downloaded from: https://github.com/checkstyle/checkstyle/blob/master/src/main/resources/google_checks.xml
2
+ * Commit: 67bd379bd8bba435ffb6cbab544c49b2d97944c0
3
+ * checkstyle.xml: Customized from google_check.xml.
4
+ * To enable suppressions through checkstyle-suppressions.xml.
5
+ * To accept package names with underscores.
6
+ * To indent with 4-column spaces.
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE suppressions PUBLIC
3
+ "-//Puppy Crawl//DTD Suppressions 1.1//EN"
4
+ "http://www.puppycrawl.com/dtds/suppressions_1_1.dtd">
5
+ <suppressions>
6
+ <suppress checks=".*" files="src/java/main/.*" />
7
+ <suppress checks=".*" files="src/java/test/.*" />
8
+ </suppressions>
@@ -1,128 +1,219 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
1
+ <?xml version="1.0"?>
2
2
  <!DOCTYPE module PUBLIC
3
- "-//Puppy Crawl//DTD Check Configuration 1.3//EN"
4
- "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
5
- <module name="Checker">
6
- <!-- https://github.com/facebook/presto/blob/master/src/checkstyle/checks.xml -->
7
- <module name="FileTabCharacter"/>
8
- <module name="NewlineAtEndOfFile">
9
- <property name="lineSeparator" value="lf"/>
10
- </module>
11
- <module name="RegexpMultiline">
12
- <property name="format" value="\r"/>
13
- <property name="message" value="Line contains carriage return"/>
14
- </module>
15
- <module name="RegexpMultiline">
16
- <property name="format" value=" \n"/>
17
- <property name="message" value="Line has trailing whitespace"/>
18
- </module>
19
- <module name="RegexpMultiline">
20
- <property name="format" value="\{\n\n"/>
21
- <property name="message" value="Blank line after opening brace"/>
22
- </module>
23
- <module name="RegexpMultiline">
24
- <property name="format" value="\n\n\s*\}"/>
25
- <property name="message" value="Blank line before closing brace"/>
26
- </module>
27
- <module name="RegexpMultiline">
28
- <property name="format" value="\n\n\n"/>
29
- <property name="message" value="Multiple consecutive blank lines"/>
30
- </module>
31
- <module name="RegexpMultiline">
32
- <property name="format" value="\n\n\Z"/>
33
- <property name="message" value="Blank line before end of file"/>
34
- </module>
35
- <module name="RegexpMultiline">
36
- <property name="format" value="Preconditions\.checkNotNull"/>
37
- <property name="message" value="Use of checkNotNull"/>
3
+ "-//Puppy Crawl//DTD Check Configuration 1.3//EN"
4
+ "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
5
+
6
+ <!--
7
+ Checkstyle configuration that checks the Google coding conventions from Google Java Style
8
+ that can be found at https://google.github.io/styleguide/javaguide.html.
9
+
10
+ Checkstyle is very configurable. Be sure to read the documentation at
11
+ http://checkstyle.sf.net (or in your downloaded distribution).
12
+
13
+ To completely disable a check, just comment it out or delete it from the file.
14
+
15
+ Authors: Max Vetrenko, Ruslan Diachenko, Roman Ivanov.
16
+ -->
17
+
18
+ <module name = "Checker">
19
+ <property name="charset" value="UTF-8"/>
20
+
21
+ <property name="severity" value="warning"/>
22
+
23
+ <property name="fileExtensions" value="java, properties, xml"/>
24
+
25
+ <module name="SuppressionFilter">
26
+ <property name="file" value="${checkstyleConfigDir}/checkstyle-suppressions.xml"/>
27
+ <property name="optional" value="false"/>
38
28
  </module>
39
29
 
30
+ <!-- Checks for whitespace -->
31
+ <!-- See http://checkstyle.sf.net/config_whitespace.html -->
32
+ <module name="FileTabCharacter">
33
+ <property name="eachLine" value="true"/>
34
+ </module>
35
+
40
36
  <module name="TreeWalker">
41
- <module name="EmptyBlock">
42
- <property name="option" value="text"/>
43
- <property name="tokens" value="
44
- LITERAL_DO, LITERAL_ELSE, LITERAL_FINALLY, LITERAL_IF,
45
- LITERAL_FOR, LITERAL_TRY, LITERAL_WHILE, INSTANCE_INIT, STATIC_INIT"/>
37
+ <module name="OuterTypeFilename"/>
38
+ <module name="IllegalTokenText">
39
+ <property name="tokens" value="STRING_LITERAL, CHAR_LITERAL"/>
40
+ <property name="format" value="\\u00(09|0(a|A)|0(c|C)|0(d|D)|22|27|5(C|c))|\\(0(10|11|12|14|15|42|47)|134)"/>
41
+ <property name="message" value="Consider using special escape sequence instead of octal value or Unicode escaped value."/>
46
42
  </module>
47
- <module name="EmptyStatement"/>
48
- <module name="EmptyForInitializerPad"/>
49
- <module name="EmptyForIteratorPad">
50
- <property name="option" value="space"/>
43
+ <module name="AvoidEscapedUnicodeCharacters">
44
+ <property name="allowEscapesForControlCharacters" value="true"/>
45
+ <property name="allowByTailComment" value="true"/>
46
+ <property name="allowNonPrintableEscapes" value="true"/>
51
47
  </module>
52
- <module name="MethodParamPad">
53
- <property name="allowLineBreaks" value="true"/>
54
- <property name="option" value="nospace"/>
48
+ <module name="LineLength">
49
+ <property name="max" value="100"/>
50
+ <property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://"/>
51
+ </module>
52
+ <module name="AvoidStarImport"/>
53
+ <module name="OneTopLevelClass"/>
54
+ <module name="NoLineWrap"/>
55
+ <module name="EmptyBlock">
56
+ <property name="option" value="TEXT"/>
57
+ <property name="tokens" value="LITERAL_TRY, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE, LITERAL_SWITCH"/>
55
58
  </module>
56
- <module name="ParenPad"/>
57
- <module name="TypecastParenPad"/>
58
59
  <module name="NeedBraces"/>
59
60
  <module name="LeftCurly">
60
- <property name="option" value="nl"/>
61
- <property name="tokens" value="CLASS_DEF, CTOR_DEF, INTERFACE_DEF, METHOD_DEF"/>
61
+ <property name="maxLineLength" value="100"/>
62
62
  </module>
63
- <module name="LeftCurly">
64
- <property name="option" value="eol"/>
65
- <property name="tokens" value="
66
- LITERAL_CATCH, LITERAL_DO, LITERAL_ELSE, LITERAL_FINALLY, LITERAL_FOR,
67
- LITERAL_IF, LITERAL_SWITCH, LITERAL_SYNCHRONIZED, LITERAL_TRY, LITERAL_WHILE"/>
63
+ <module name="RightCurly">
64
+ <property name="id" value="RightCurlySame"/>
65
+ <property name="tokens" value="LITERAL_TRY, LITERAL_CATCH, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE, LITERAL_DO"/>
68
66
  </module>
69
67
  <module name="RightCurly">
68
+ <property name="id" value="RightCurlyAlone"/>
70
69
  <property name="option" value="alone"/>
70
+ <property name="tokens" value="CLASS_DEF, METHOD_DEF, CTOR_DEF, LITERAL_FOR, LITERAL_WHILE, STATIC_INIT, INSTANCE_INIT"/>
71
71
  </module>
72
- <module name="GenericWhitespace"/>
73
- <module name="WhitespaceAfter"/>
74
- <module name="NoWhitespaceBefore"/>
75
-
76
- <module name="UpperEll"/>
77
- <module name="DefaultComesLast"/>
78
- <module name="ArrayTypeStyle"/>
72
+ <module name="WhitespaceAround">
73
+ <property name="allowEmptyConstructors" value="true"/>
74
+ <property name="allowEmptyMethods" value="true"/>
75
+ <property name="allowEmptyTypes" value="true"/>
76
+ <property name="allowEmptyLoops" value="true"/>
77
+ <message key="ws.notFollowed"
78
+ 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)"/>
79
+ <message key="ws.notPreceded"
80
+ value="WhitespaceAround: ''{0}'' is not preceded with whitespace."/>
81
+ </module>
82
+ <module name="OneStatementPerLine"/>
79
83
  <module name="MultipleVariableDeclarations"/>
84
+ <module name="ArrayTypeStyle"/>
85
+ <module name="MissingSwitchDefault"/>
86
+ <module name="FallThrough"/>
87
+ <module name="UpperEll"/>
80
88
  <module name="ModifierOrder"/>
81
- <module name="OneStatementPerLine"/>
82
- <module name="StringLiteralEquality"/>
83
- <module name="MutableException"/>
84
- <module name="EqualsHashCode"/>
85
- <module name="InnerAssignment"/>
86
- <module name="InterfaceIsType"/>
87
- <module name="HideUtilityClassConstructor"/>
88
-
89
- <module name="MemberName"/>
90
- <module name="LocalVariableName"/>
91
- <module name="LocalFinalVariableName"/>
92
- <module name="TypeName"/>
93
- <module name="PackageName"/>
94
- <module name="ParameterName"/>
95
- <module name="StaticVariableName"/>
89
+ <module name="EmptyLineSeparator">
90
+ <property name="allowNoEmptyLineBetweenFields" value="true"/>
91
+ </module>
92
+ <module name="SeparatorWrap">
93
+ <property name="id" value="SeparatorWrapDot"/>
94
+ <property name="tokens" value="DOT"/>
95
+ <property name="option" value="nl"/>
96
+ </module>
97
+ <module name="SeparatorWrap">
98
+ <property name="id" value="SeparatorWrapComma"/>
99
+ <property name="tokens" value="COMMA"/>
100
+ <property name="option" value="EOL"/>
101
+ </module>
102
+ <module name="TypeName">
103
+ <message key="name.invalidPattern"
104
+ value="Type name ''{0}'' must match pattern ''{1}''."/>
105
+ </module>
106
+ <module name="MemberName">
107
+ <property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9]*$"/>
108
+ <message key="name.invalidPattern"
109
+ value="Member name ''{0}'' must match pattern ''{1}''."/>
110
+ </module>
111
+ <module name="ParameterName">
112
+ <property name="format" value="^[a-z]([a-z0-9][a-zA-Z0-9]*)?$"/>
113
+ <message key="name.invalidPattern"
114
+ value="Parameter name ''{0}'' must match pattern ''{1}''."/>
115
+ </module>
116
+ <module name="CatchParameterName">
117
+ <property name="format" value="^[a-z]([a-z0-9][a-zA-Z0-9]*)?$"/>
118
+ <message key="name.invalidPattern"
119
+ value="Catch parameter name ''{0}'' must match pattern ''{1}''."/>
120
+ </module>
121
+ <module name="LocalVariableName">
122
+ <property name="tokens" value="VARIABLE_DEF"/>
123
+ <property name="format" value="^[a-z]([a-z0-9][a-zA-Z0-9]*)?$"/>
124
+ <message key="name.invalidPattern"
125
+ value="Local variable name ''{0}'' must match pattern ''{1}''."/>
126
+ </module>
96
127
  <module name="ClassTypeParameterName">
97
- <property name="format" value="^[A-Z][0-9]?$"/>
128
+ <property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
129
+ <message key="name.invalidPattern"
130
+ value="Class type name ''{0}'' must match pattern ''{1}''."/>
98
131
  </module>
99
132
  <module name="MethodTypeParameterName">
100
- <property name="format" value="^[A-Z][0-9]?$"/>
133
+ <property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
134
+ <message key="name.invalidPattern"
135
+ value="Method type name ''{0}'' must match pattern ''{1}''."/>
101
136
  </module>
102
-
103
- <module name="AvoidStarImport"/>
104
- <module name="RedundantImport"/>
105
- <module name="UnusedImports"/>
106
- <module name="ImportOrder">
107
- <property name="groups" value="*,javax,java"/>
108
- <property name="separated" value="true"/>
109
- <property name="option" value="bottom"/>
110
- <property name="sortStaticImportsAlphabetically" value="true"/>
137
+ <module name="InterfaceTypeParameterName">
138
+ <property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
139
+ <message key="name.invalidPattern"
140
+ value="Interface type name ''{0}'' must match pattern ''{1}''."/>
111
141
  </module>
112
-
113
- <module name="WhitespaceAround">
114
- <property name="allowEmptyConstructors" value="true"/>
115
- <property name="allowEmptyMethods" value="true"/>
116
- <property name="ignoreEnhancedForColon" value="false"/>
117
- <property name="tokens" value="
118
- ASSIGN, BAND, BAND_ASSIGN, BOR, BOR_ASSIGN, BSR, BSR_ASSIGN,
119
- BXOR, BXOR_ASSIGN, COLON, DIV, DIV_ASSIGN, EQUAL, GE, GT, LAND, LE,
120
- LITERAL_ASSERT, LITERAL_CATCH, LITERAL_DO, LITERAL_ELSE,
121
- LITERAL_FINALLY, LITERAL_FOR, LITERAL_IF, LITERAL_RETURN,
122
- LITERAL_SYNCHRONIZED, LITERAL_TRY, LITERAL_WHILE,
123
- LOR, LT, MINUS, MINUS_ASSIGN, MOD, MOD_ASSIGN, NOT_EQUAL,
124
- PLUS, PLUS_ASSIGN, QUESTION, SL, SLIST, SL_ASSIGN, SR, SR_ASSIGN,
125
- STAR, STAR_ASSIGN, TYPE_EXTENSION_AND"/>
142
+ <module name="NoFinalizer"/>
143
+ <module name="GenericWhitespace">
144
+ <message key="ws.followed"
145
+ value="GenericWhitespace ''{0}'' is followed by whitespace."/>
146
+ <message key="ws.preceded"
147
+ value="GenericWhitespace ''{0}'' is preceded with whitespace."/>
148
+ <message key="ws.illegalFollow"
149
+ value="GenericWhitespace ''{0}'' should followed by whitespace."/>
150
+ <message key="ws.notPreceded"
151
+ value="GenericWhitespace ''{0}'' is not preceded with whitespace."/>
152
+ </module>
153
+ <module name="Indentation">
154
+ <property name="basicOffset" value="4"/>
155
+ <property name="braceAdjustment" value="0"/>
156
+ <property name="caseIndent" value="4"/>
157
+ <property name="throwsIndent" value="8"/>
158
+ <property name="lineWrappingIndentation" value="8"/>
159
+ <property name="arrayInitIndent" value="4"/>
160
+ </module>
161
+ <module name="AbbreviationAsWordInName">
162
+ <property name="ignoreFinal" value="false"/>
163
+ <property name="allowedAbbreviationLength" value="1"/>
164
+ </module>
165
+ <module name="OverloadMethodsDeclarationOrder"/>
166
+ <module name="VariableDeclarationUsageDistance"/>
167
+ <module name="CustomImportOrder">
168
+ <property name="sortImportsInGroupAlphabetically" value="true"/>
169
+ <property name="separateLineBetweenGroups" value="true"/>
170
+ <property name="customImportOrderRules" value="STATIC###THIRD_PARTY_PACKAGE"/>
171
+ </module>
172
+ <module name="MethodParamPad"/>
173
+ <module name="ParenPad"/>
174
+ <module name="OperatorWrap">
175
+ <property name="option" value="NL"/>
176
+ <property name="tokens" value="BAND, BOR, BSR, BXOR, DIV, EQUAL, GE, GT, LAND, LE, LITERAL_INSTANCEOF, LOR, LT, MINUS, MOD, NOT_EQUAL, PLUS, QUESTION, SL, SR, STAR, METHOD_REF "/>
177
+ </module>
178
+ <module name="AnnotationLocation">
179
+ <property name="id" value="AnnotationLocationMostCases"/>
180
+ <property name="tokens" value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF"/>
181
+ </module>
182
+ <module name="AnnotationLocation">
183
+ <property name="id" value="AnnotationLocationVariables"/>
184
+ <property name="tokens" value="VARIABLE_DEF"/>
185
+ <property name="allowSamelineMultipleAnnotations" value="true"/>
186
+ </module>
187
+ <module name="NonEmptyAtclauseDescription"/>
188
+ <module name="JavadocTagContinuationIndentation"/>
189
+ <module name="SummaryJavadoc">
190
+ <property name="forbiddenSummaryFragments" value="^@return the *|^This method returns |^A [{]@code [a-zA-Z0-9]+[}]( is a )"/>
191
+ </module>
192
+ <module name="JavadocParagraph"/>
193
+ <module name="AtclauseOrder">
194
+ <property name="tagOrder" value="@param, @return, @throws, @deprecated"/>
195
+ <property name="target" value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF, VARIABLE_DEF"/>
196
+ </module>
197
+ <module name="JavadocMethod">
198
+ <property name="scope" value="public"/>
199
+ <property name="allowMissingParamTags" value="true"/>
200
+ <property name="allowMissingThrowsTags" value="true"/>
201
+ <property name="allowMissingReturnTag" value="true"/>
202
+ <property name="minLineCount" value="2"/>
203
+ <property name="allowedAnnotations" value="Override, Test"/>
204
+ <property name="allowThrowsTagsForSubclasses" value="true"/>
205
+ </module>
206
+ <module name="MethodName">
207
+ <property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9_]*$"/>
208
+ <message key="name.invalidPattern"
209
+ value="Method name ''{0}'' must match pattern ''{1}''."/>
210
+ </module>
211
+ <module name="SingleLineJavadoc">
212
+ <property name="ignoreInlineTags" value="false"/>
213
+ </module>
214
+ <module name="EmptyCatchBlock">
215
+ <property name="exceptionVariableName" value="expected"/>
126
216
  </module>
217
+ <module name="CommentsIndentation"/>
127
218
  </module>
128
219
  </module>
@@ -0,0 +1,218 @@
1
+ <?xml version="1.0"?>
2
+ <!DOCTYPE module PUBLIC
3
+ "-//Puppy Crawl//DTD Check Configuration 1.3//EN"
4
+ "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
5
+
6
+ <!--
7
+ Checkstyle configuration that checks the Google coding conventions from Google Java Style
8
+ that can be found at https://google.github.io/styleguide/javaguide.html.
9
+
10
+ Checkstyle is very configurable. Be sure to read the documentation at
11
+ http://checkstyle.sf.net (or in your downloaded distribution).
12
+
13
+ To completely disable a check, just comment it out or delete it from the file.
14
+
15
+ Authors: Max Vetrenko, Ruslan Diachenko, Roman Ivanov.
16
+ -->
17
+
18
+ <module name = "Checker">
19
+ <property name="charset" value="UTF-8"/>
20
+
21
+ <property name="severity" value="warning"/>
22
+
23
+ <property name="fileExtensions" value="java, properties, xml"/>
24
+ <!-- Checks for whitespace -->
25
+ <!-- See http://checkstyle.sf.net/config_whitespace.html -->
26
+ <module name="FileTabCharacter">
27
+ <property name="eachLine" value="true"/>
28
+ </module>
29
+
30
+ <module name="TreeWalker">
31
+ <module name="OuterTypeFilename"/>
32
+ <module name="IllegalTokenText">
33
+ <property name="tokens" value="STRING_LITERAL, CHAR_LITERAL"/>
34
+ <property name="format" value="\\u00(09|0(a|A)|0(c|C)|0(d|D)|22|27|5(C|c))|\\(0(10|11|12|14|15|42|47)|134)"/>
35
+ <property name="message" value="Consider using special escape sequence instead of octal value or Unicode escaped value."/>
36
+ </module>
37
+ <module name="AvoidEscapedUnicodeCharacters">
38
+ <property name="allowEscapesForControlCharacters" value="true"/>
39
+ <property name="allowByTailComment" value="true"/>
40
+ <property name="allowNonPrintableEscapes" value="true"/>
41
+ </module>
42
+ <module name="LineLength">
43
+ <property name="max" value="100"/>
44
+ <property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://"/>
45
+ </module>
46
+ <module name="AvoidStarImport"/>
47
+ <module name="OneTopLevelClass"/>
48
+ <module name="NoLineWrap"/>
49
+ <module name="EmptyBlock">
50
+ <property name="option" value="TEXT"/>
51
+ <property name="tokens" value="LITERAL_TRY, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE, LITERAL_SWITCH"/>
52
+ </module>
53
+ <module name="NeedBraces"/>
54
+ <module name="LeftCurly">
55
+ <property name="maxLineLength" value="100"/>
56
+ </module>
57
+ <module name="RightCurly">
58
+ <property name="id" value="RightCurlySame"/>
59
+ <property name="tokens" value="LITERAL_TRY, LITERAL_CATCH, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE, LITERAL_DO"/>
60
+ </module>
61
+ <module name="RightCurly">
62
+ <property name="id" value="RightCurlyAlone"/>
63
+ <property name="option" value="alone"/>
64
+ <property name="tokens" value="CLASS_DEF, METHOD_DEF, CTOR_DEF, LITERAL_FOR, LITERAL_WHILE, STATIC_INIT, INSTANCE_INIT"/>
65
+ </module>
66
+ <module name="WhitespaceAround">
67
+ <property name="allowEmptyConstructors" value="true"/>
68
+ <property name="allowEmptyMethods" value="true"/>
69
+ <property name="allowEmptyTypes" value="true"/>
70
+ <property name="allowEmptyLoops" value="true"/>
71
+ <message key="ws.notFollowed"
72
+ 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)"/>
73
+ <message key="ws.notPreceded"
74
+ value="WhitespaceAround: ''{0}'' is not preceded with whitespace."/>
75
+ </module>
76
+ <module name="OneStatementPerLine"/>
77
+ <module name="MultipleVariableDeclarations"/>
78
+ <module name="ArrayTypeStyle"/>
79
+ <module name="MissingSwitchDefault"/>
80
+ <module name="FallThrough"/>
81
+ <module name="UpperEll"/>
82
+ <module name="ModifierOrder"/>
83
+ <module name="EmptyLineSeparator">
84
+ <property name="allowNoEmptyLineBetweenFields" value="true"/>
85
+ </module>
86
+ <module name="SeparatorWrap">
87
+ <property name="id" value="SeparatorWrapDot"/>
88
+ <property name="tokens" value="DOT"/>
89
+ <property name="option" value="nl"/>
90
+ </module>
91
+ <module name="SeparatorWrap">
92
+ <property name="id" value="SeparatorWrapComma"/>
93
+ <property name="tokens" value="COMMA"/>
94
+ <property name="option" value="EOL"/>
95
+ </module>
96
+ <module name="PackageName">
97
+ <property name="format" value="^[a-z]+(\.[a-z][a-z0-9]*)*$"/>
98
+ <message key="name.invalidPattern"
99
+ value="Package name ''{0}'' must match pattern ''{1}''."/>
100
+ </module>
101
+ <module name="TypeName">
102
+ <message key="name.invalidPattern"
103
+ value="Type name ''{0}'' must match pattern ''{1}''."/>
104
+ </module>
105
+ <module name="MemberName">
106
+ <property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9]*$"/>
107
+ <message key="name.invalidPattern"
108
+ value="Member name ''{0}'' must match pattern ''{1}''."/>
109
+ </module>
110
+ <module name="ParameterName">
111
+ <property name="format" value="^[a-z]([a-z0-9][a-zA-Z0-9]*)?$"/>
112
+ <message key="name.invalidPattern"
113
+ value="Parameter name ''{0}'' must match pattern ''{1}''."/>
114
+ </module>
115
+ <module name="CatchParameterName">
116
+ <property name="format" value="^[a-z]([a-z0-9][a-zA-Z0-9]*)?$"/>
117
+ <message key="name.invalidPattern"
118
+ value="Catch parameter name ''{0}'' must match pattern ''{1}''."/>
119
+ </module>
120
+ <module name="LocalVariableName">
121
+ <property name="tokens" value="VARIABLE_DEF"/>
122
+ <property name="format" value="^[a-z]([a-z0-9][a-zA-Z0-9]*)?$"/>
123
+ <message key="name.invalidPattern"
124
+ value="Local variable name ''{0}'' must match pattern ''{1}''."/>
125
+ </module>
126
+ <module name="ClassTypeParameterName">
127
+ <property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
128
+ <message key="name.invalidPattern"
129
+ value="Class type name ''{0}'' must match pattern ''{1}''."/>
130
+ </module>
131
+ <module name="MethodTypeParameterName">
132
+ <property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
133
+ <message key="name.invalidPattern"
134
+ value="Method type name ''{0}'' must match pattern ''{1}''."/>
135
+ </module>
136
+ <module name="InterfaceTypeParameterName">
137
+ <property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
138
+ <message key="name.invalidPattern"
139
+ value="Interface type name ''{0}'' must match pattern ''{1}''."/>
140
+ </module>
141
+ <module name="NoFinalizer"/>
142
+ <module name="GenericWhitespace">
143
+ <message key="ws.followed"
144
+ value="GenericWhitespace ''{0}'' is followed by whitespace."/>
145
+ <message key="ws.preceded"
146
+ value="GenericWhitespace ''{0}'' is preceded with whitespace."/>
147
+ <message key="ws.illegalFollow"
148
+ value="GenericWhitespace ''{0}'' should followed by whitespace."/>
149
+ <message key="ws.notPreceded"
150
+ value="GenericWhitespace ''{0}'' is not preceded with whitespace."/>
151
+ </module>
152
+ <module name="Indentation">
153
+ <property name="basicOffset" value="2"/>
154
+ <property name="braceAdjustment" value="0"/>
155
+ <property name="caseIndent" value="2"/>
156
+ <property name="throwsIndent" value="4"/>
157
+ <property name="lineWrappingIndentation" value="4"/>
158
+ <property name="arrayInitIndent" value="2"/>
159
+ </module>
160
+ <module name="AbbreviationAsWordInName">
161
+ <property name="ignoreFinal" value="false"/>
162
+ <property name="allowedAbbreviationLength" value="1"/>
163
+ </module>
164
+ <module name="OverloadMethodsDeclarationOrder"/>
165
+ <module name="VariableDeclarationUsageDistance"/>
166
+ <module name="CustomImportOrder">
167
+ <property name="sortImportsInGroupAlphabetically" value="true"/>
168
+ <property name="separateLineBetweenGroups" value="true"/>
169
+ <property name="customImportOrderRules" value="STATIC###THIRD_PARTY_PACKAGE"/>
170
+ </module>
171
+ <module name="MethodParamPad"/>
172
+ <module name="ParenPad"/>
173
+ <module name="OperatorWrap">
174
+ <property name="option" value="NL"/>
175
+ <property name="tokens" value="BAND, BOR, BSR, BXOR, DIV, EQUAL, GE, GT, LAND, LE, LITERAL_INSTANCEOF, LOR, LT, MINUS, MOD, NOT_EQUAL, PLUS, QUESTION, SL, SR, STAR, METHOD_REF "/>
176
+ </module>
177
+ <module name="AnnotationLocation">
178
+ <property name="id" value="AnnotationLocationMostCases"/>
179
+ <property name="tokens" value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF"/>
180
+ </module>
181
+ <module name="AnnotationLocation">
182
+ <property name="id" value="AnnotationLocationVariables"/>
183
+ <property name="tokens" value="VARIABLE_DEF"/>
184
+ <property name="allowSamelineMultipleAnnotations" value="true"/>
185
+ </module>
186
+ <module name="NonEmptyAtclauseDescription"/>
187
+ <module name="JavadocTagContinuationIndentation"/>
188
+ <module name="SummaryJavadoc">
189
+ <property name="forbiddenSummaryFragments" value="^@return the *|^This method returns |^A [{]@code [a-zA-Z0-9]+[}]( is a )"/>
190
+ </module>
191
+ <module name="JavadocParagraph"/>
192
+ <module name="AtclauseOrder">
193
+ <property name="tagOrder" value="@param, @return, @throws, @deprecated"/>
194
+ <property name="target" value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF, VARIABLE_DEF"/>
195
+ </module>
196
+ <module name="JavadocMethod">
197
+ <property name="scope" value="public"/>
198
+ <property name="allowMissingParamTags" value="true"/>
199
+ <property name="allowMissingThrowsTags" value="true"/>
200
+ <property name="allowMissingReturnTag" value="true"/>
201
+ <property name="minLineCount" value="2"/>
202
+ <property name="allowedAnnotations" value="Override, Test"/>
203
+ <property name="allowThrowsTagsForSubclasses" value="true"/>
204
+ </module>
205
+ <module name="MethodName">
206
+ <property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9_]*$"/>
207
+ <message key="name.invalidPattern"
208
+ value="Method name ''{0}'' must match pattern ''{1}''."/>
209
+ </module>
210
+ <module name="SingleLineJavadoc">
211
+ <property name="ignoreInlineTags" value="false"/>
212
+ </module>
213
+ <module name="EmptyCatchBlock">
214
+ <property name="exceptionVariableName" value="expected"/>
215
+ </module>
216
+ <module name="CommentsIndentation"/>
217
+ </module>
218
+ </module>