Skip to content

Commit 537649b

Browse files
Pmd clean up (#1215)
* Add PMD Annotations in order to avoid useless exceptions for the Deparsers * Add Eclipse Formatter configuration * Fix typo * Replace Comments on empty methods with Class wide PMD Annotation Do not enforce checkstyle formatting
1 parent c783240 commit 537649b

37 files changed

+505
-99
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Also I would like to know about needed examples or documentation stuff.
6363
** API change FunctionWithCondParams production removed
6464
* API change in ValuesStatement: the expression list is now hold as a ItemList and not as a List<Expression>
6565
* support for parser modification within **parseExpression** and **parseCondExpression**
66-
' support for table schema for foreign keys
66+
* support for table schema for foreign keys
6767
* support for Oracle hints on **insert, update and merge**
6868
* support for **merge insert where** clause
6969
* allow **in** as schema name

eclipse-java-google-style.xml

Lines changed: 337 additions & 0 deletions
Large diffs are not rendered by default.

nb-configuration.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,13 @@
2020
<com-junichi11-netbeans-changelf.use-global>false</com-junichi11-netbeans-changelf.use-global>
2121
<org-netbeans-modules-javascript2-requirejs.enabled>true</org-netbeans-modules-javascript2-requirejs.enabled>
2222
<netbeans.hint.jdkPlatform>JDK_1.8</netbeans.hint.jdkPlatform>
23+
<org-netbeans-modules-editor-indent.text.xml.CodeStyle.project.expand-tabs>false</org-netbeans-modules-editor-indent.text.xml.CodeStyle.project.expand-tabs>
24+
<org-netbeans-modules-editor-indent.CodeStyle.project.text-line-wrap>none</org-netbeans-modules-editor-indent.CodeStyle.project.text-line-wrap>
25+
<org-netbeans-modules-editor-indent.CodeStyle.project.indent-shift-width>4</org-netbeans-modules-editor-indent.CodeStyle.project.indent-shift-width>
26+
<org-netbeans-modules-editor-indent.CodeStyle.project.spaces-per-tab>4</org-netbeans-modules-editor-indent.CodeStyle.project.spaces-per-tab>
27+
<org-netbeans-modules-editor-indent.CodeStyle.project.tab-size>4</org-netbeans-modules-editor-indent.CodeStyle.project.tab-size>
28+
<org-netbeans-modules-editor-indent.CodeStyle.project.text-limit-width>120</org-netbeans-modules-editor-indent.CodeStyle.project.text-limit-width>
29+
<org-netbeans-modules-editor-indent.CodeStyle.project.expand-tabs>true</org-netbeans-modules-editor-indent.CodeStyle.project.expand-tabs>
30+
<org-netbeans-modules-editor-indent.CodeStyle.usedProfile>project</org-netbeans-modules-editor-indent.CodeStyle.usedProfile>
2331
</properties>
2432
</project-shared-configuration>

pmd-rules.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,5 +110,7 @@ under the License.
110110

111111
<rule ref="category/java/performance.xml/BigIntegerInstantiation" />
112112
<rule ref="category/java/performance.xml/BooleanInstantiation" />
113-
113+
114+
<!-- for Codazy -->
115+
<rule ref="category/java/documentation.xml/UncommentedEmptyMethodBody" />
114116
</ruleset>

pom.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,13 @@
365365
<artifactId>javacc-maven-plugin</artifactId>
366366
<version>2.6</version>
367367
</plugin>
368+
<plugin>
369+
<groupId>org.apache.maven.plugins</groupId>
370+
<artifactId>maven-checkstyle-plugin</artifactId>
371+
<configuration>
372+
<configLocation>config/sun_checks.xml</configLocation>
373+
</configuration>
374+
</plugin>
368375
</plugins>
369376
</reporting>
370377

src/main/java/net/sf/jsqlparser/expression/AnalyticExpression.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ public void setIgnoreNulls(boolean ignoreNulls) {
179179
}
180180

181181
@Override
182-
@SuppressWarnings({"PMD.CyclomaticComplexity", "PMD.ExcessiveMethodLength"})
182+
@SuppressWarnings({"PMD.CyclomaticComplexity", "PMD.NPathComplexity"})
183183
public String toString() {
184184
StringBuilder b = new StringBuilder();
185185

src/main/java/net/sf/jsqlparser/expression/ExpressionVisitorAdapter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
import net.sf.jsqlparser.statement.select.UnPivot;
3131
import net.sf.jsqlparser.statement.select.WithItem;
3232

33-
@SuppressWarnings({"PMD.CyclomaticComplexity"})
33+
@SuppressWarnings({"PMD.CyclomaticComplexity", "PMD.UncommentedEmptyMethodBody"})
3434
public class ExpressionVisitorAdapter implements ExpressionVisitor, ItemsListVisitor, PivotVisitor, SelectItemVisitor {
3535

3636
private SelectVisitor selectVisitor;

src/main/java/net/sf/jsqlparser/expression/Function.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ public void setKeep(KeepExpression keep) {
168168
}
169169

170170
@Override
171-
@SuppressWarnings({"PMD.CyclomaticComplexity"})
171+
@SuppressWarnings({"PMD.CyclomaticComplexity", "PMD.NPathComplexity"})
172172
public String toString() {
173173
String params;
174174

src/main/java/net/sf/jsqlparser/expression/operators/relational/ItemsListVisitorAdapter.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
import net.sf.jsqlparser.statement.select.SubSelect;
1313

14+
@SuppressWarnings({"PMD.UncommentedEmptyMethodBody"})
1415
public class ItemsListVisitorAdapter implements ItemsListVisitor {
1516

1617
@Override

src/main/java/net/sf/jsqlparser/statement/StatementVisitorAdapter.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
import net.sf.jsqlparser.statement.upsert.Upsert;
3434
import net.sf.jsqlparser.statement.values.ValuesStatement;
3535

36+
@SuppressWarnings({"PMD.UncommentedEmptyMethodBody"})
3637
public class StatementVisitorAdapter implements StatementVisitor {
3738

3839
@Override

0 commit comments

Comments
 (0)