Skip to content

Commit da3006d

Browse files
committed
Added Palantir Java Formatter, Vertival Blank and DBeaver SQL Formatter Tests and documentation
1 parent 87d9410 commit da3006d

34 files changed

Lines changed: 1068 additions & 144 deletions

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,10 @@ the same way as e.g. your co-workers do with their Eclipse IDE.
3131
* [Google Code Formatter](https://github.com/google/google-java-format)
3232
* [Eclipse Java Code Formatter](https://help.eclipse.org/kepler/index.jsp?topic=%2Forg.eclipse.jdt.doc.isv%2Fguide%2Fjdt_api_codeformatter.htm)
3333
* [Spring Java Formatter](https://github.com/spring-io/spring-javaformat)
34+
* [Palantir Java Formatter](https://github.com/palantir/palantir-java-format)
3435

3536
* Javascript
36-
* [Eclipse Javascript Code Formatter](https://help.eclipse.org/2019-12/index.jsp?topic=%2Forg.eclipse.wst.jsdt.doc%2Fstarted%2Foverview.html&cp%3D52_0)
37+
* [Eclipse Javascript Code Formatter](https://help.eclipse.org/2019-12/index.jsp?topic=%2Forg.eclipse.wst.jsdt.doc%2Fstarted%2Foverview.html&cp%3D52_0) (via [modified revelc jsdt-core](https://github.com/funfried/jsdt-core))
3738

3839
* XML
3940
* [revelc.net XML Code Formatter](https://github.com/revelc/xml-formatter)
@@ -44,6 +45,8 @@ the same way as e.g. your co-workers do with their Eclipse IDE.
4445

4546
* SQL
4647
* [manticore JSQLFormatter](https://github.com/manticore-projects/jsqlformatter)
48+
* [Vertical Blank SQL Formatter](https://github.com/vertical-blank/sql-formatter)
49+
* [DBeaver SQL Formatter (via Spotless)](https://github.com/diffplug/spotless)
4750

4851
### Features
4952
* Makes use of the internal NetBeans formatting API, which makes it possible to reuse built-in features like the format on save action or format only selected lines ... (since 1.13)
@@ -66,6 +69,9 @@ the same way as e.g. your co-workers do with their Eclipse IDE.
6669
* Support for Jackson Json formatter (since 1.14)
6770
* Support for manticore JSQLFormatter (Special thanks to [Andreas Reichel](https://github.com/manticore-projects) for the contribution) (since 1.14.1)
6871
* Support for remote configurations for Eclipse formatters (since 1.14.1)
72+
* Support for Palantir Java Formatter (since 1.15.0)
73+
* Support for Vertical Blank SQL Formatter (since 1.15.0)
74+
* Support for DBeaver (via Spotless) (since 1.15.0)
6975

7076
Compatibility
7177
-------------

nb-configuration.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,9 @@
4242
<de-funfried-netbeans-plugins-externalcodeformatter.revelcXmlLinefeed/>
4343
<de-funfried-netbeans-plugins-externalcodeformatter.jacksonJsonExpandTabsToSpaces>false</de-funfried-netbeans-plugins-externalcodeformatter.jacksonJsonExpandTabsToSpaces>
4444
<de-funfried-netbeans-plugins-externalcodeformatter.revelcXmlWrapLongLines>false</de-funfried-netbeans-plugins-externalcodeformatter.revelcXmlWrapLongLines>
45+
<org-netbeans-modules-javascript2-requirejs.enabled>true</org-netbeans-modules-javascript2-requirejs.enabled>
46+
<de-funfried-netbeans-plugins-externalcodeformatter.enabledFormatter_2e_XML>netbeans-formatter</de-funfried-netbeans-plugins-externalcodeformatter.enabledFormatter_2e_XML>
47+
<de-funfried-netbeans-plugins-externalcodeformatter.enabledFormatter_2e_JAVASCRIPT>netbeans-formatter</de-funfried-netbeans-plugins-externalcodeformatter.enabledFormatter_2e_JAVASCRIPT>
48+
<de-funfried-netbeans-plugins-externalcodeformatter.enabledFormatter_2e_SQL>netbeans-formatter</de-funfried-netbeans-plugins-externalcodeformatter.enabledFormatter_2e_SQL>
4549
</properties>
4650
</project-shared-configuration>

pom.xml

Lines changed: 83 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -113,34 +113,18 @@
113113
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
114114
<project.build.resourceEncoding>UTF-8</project.build.resourceEncoding>
115115
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
116-
<google-java-format.version>1.13.0</google-java-format.version>
116+
<google-java-format.version>1.15.0</google-java-format.version>
117+
<palantir-java-format.version>2.24.0</palantir-java-format.version>
117118
<xml-formatter.version>0.2.2</xml-formatter.version>
118119
<commons-lang.version>3.12.0</commons-lang.version>
119120
<netbeans.version>RELEASE120</netbeans.version>
120-
<jackson.version>2.13.1</jackson.version>
121+
<jackson.version>2.13.2</jackson.version>
121122
<jsoup.version>1.14.3</jsoup.version>
123+
<pmd.version>6.44.0</pmd.version>
122124
<argLine></argLine>
123125
</properties>
124126

125127
<dependencies>
126-
<!-- <dependency>
127-
<groupId>org.apache.maven</groupId>
128-
<artifactId>maven-core</artifactId>
129-
<version>3.8.4</version>
130-
</dependency>
131-
132-
<dependency>
133-
<groupId>org.apache.maven</groupId>
134-
<artifactId>maven-model</artifactId>
135-
<version>3.8.4</version>
136-
</dependency>
137-
138-
<dependency>
139-
<groupId>com.pinterest.ktlint</groupId>
140-
<artifactId>ktlint-core</artifactId>
141-
<version>0.43.2</version>
142-
</dependency>-->
143-
144128
<!-- Eclipse Formatter -->
145129
<dependency>
146130
<groupId>org.eclipse.platform</groupId>
@@ -152,14 +136,24 @@
152136
<dependency>
153137
<groupId>org.eclipse.jdt</groupId>
154138
<artifactId>org.eclipse.jdt.core</artifactId>
155-
<version>3.28.0</version>
139+
<version>3.29.0</version>
156140
</dependency>
157141

158142
<!-- Eclipse JavaScript Formatter -->
159143
<dependency>
160-
<groupId>net.revelc.code.formatter</groupId>
144+
<groupId>de.funfried.libraries</groupId>
161145
<artifactId>jsdt-core</artifactId>
162-
<version>3.0.0</version>
146+
<version>1.0.0-SNAPSHOT</version>
147+
<exclusions>
148+
<exclusion>
149+
<groupId>com.google.guava</groupId>
150+
<artifactId>guava</artifactId>
151+
</exclusion>
152+
<exclusion>
153+
<groupId>com.google.javascript</groupId>
154+
<artifactId>closure-compiler-unshaded</artifactId>
155+
</exclusion>
156+
</exclusions>
163157
</dependency>
164158

165159
<!-- Spring Formatter -->
@@ -174,20 +168,36 @@
174168
<groupId>com.google.googlejavaformat</groupId>
175169
<artifactId>google-java-format</artifactId>
176170
<version>${google-java-format.version}</version>
171+
<exclusions>
172+
<exclusion>
173+
<groupId>com.google.guava</groupId>
174+
<artifactId>guava</artifactId>
175+
</exclusion>
176+
</exclusions>
177177
</dependency>
178178

179179
<!-- Palantir Formatter -->
180180
<dependency>
181181
<groupId>com.palantir.javaformat</groupId>
182182
<artifactId>palantir-java-format</artifactId>
183-
<version>2.17.0</version>
183+
<version>${palantir-java-format.version}</version>
184+
<exclusions>
185+
<exclusion>
186+
<groupId>com.google.guava</groupId>
187+
<artifactId>guava</artifactId>
188+
</exclusion>
189+
</exclusions>
184190
</dependency>
185191

186192
<dependency>
187193
<groupId>com.palantir.javaformat</groupId>
188194
<artifactId>palantir-java-format-spi</artifactId>
189-
<version>2.17.0</version>
195+
<version>${palantir-java-format.version}</version>
190196
<exclusions>
197+
<exclusion>
198+
<groupId>com.google.guava</groupId>
199+
<artifactId>guava</artifactId>
200+
</exclusion>
191201
<exclusion>
192202
<groupId>com.fasterxml.jackson.core</groupId>
193203
<artifactId>*</artifactId>
@@ -199,7 +209,7 @@
199209
<dependency>
200210
<groupId>com.diffplug.spotless</groupId>
201211
<artifactId>spotless-lib</artifactId>
202-
<version>2.22.2</version>
212+
<version>2.25.0</version>
203213
</dependency>
204214

205215
<!-- XML Formatter -->
@@ -232,7 +242,7 @@
232242
<dependency>
233243
<groupId>com.manticore-projects.jsqlformatter</groupId>
234244
<artifactId>jsqlformatter</artifactId>
235-
<version>0.1.9</version>
245+
<version>0.1.11</version>
236246
</dependency>
237247

238248
<!-- Vertical Blank SQL Formatter -->
@@ -406,6 +416,13 @@
406416
<version>2.11.0</version>
407417
</dependency>
408418

419+
<!-- Google -->
420+
<dependency>
421+
<groupId>com.google.guava</groupId>
422+
<artifactId>guava</artifactId>
423+
<version>31.1-jre</version>
424+
</dependency>
425+
409426
<!-- Test -->
410427
<dependency>
411428
<groupId>org.netbeans.api</groupId>
@@ -428,12 +445,12 @@
428445
<plugin>
429446
<groupId>org.apache.netbeans.utilities</groupId>
430447
<artifactId>nbm-maven-plugin</artifactId>
431-
<version>4.6</version>
448+
<version>4.7</version>
432449
</plugin>
433450
<plugin>
434451
<groupId>org.apache.maven.plugins</groupId>
435452
<artifactId>maven-compiler-plugin</artifactId>
436-
<version>3.10.0</version>
453+
<version>3.10.1</version>
437454
</plugin>
438455
<plugin>
439456
<groupId>org.apache.maven.plugins</groupId>
@@ -453,7 +470,7 @@
453470
<plugin>
454471
<groupId>org.apache.maven.plugins</groupId>
455472
<artifactId>maven-clean-plugin</artifactId>
456-
<version>3.1.0</version>
473+
<version>3.2.0</version>
457474
</plugin>
458475
<plugin>
459476
<groupId>org.apache.maven.plugins</groupId>
@@ -468,12 +485,12 @@
468485
<plugin>
469486
<groupId>org.apache.maven.plugins</groupId>
470487
<artifactId>maven-antrun-plugin</artifactId>
471-
<version>3.0.0</version>
488+
<version>3.1.0</version>
472489
</plugin>
473490
<plugin>
474491
<groupId>org.sonatype.plugins</groupId>
475492
<artifactId>nexus-staging-maven-plugin</artifactId>
476-
<version>1.6.10</version>
493+
<version>1.6.13</version>
477494
<configuration>
478495
<serverId>sonatype-nexus-staging</serverId>
479496
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
@@ -498,12 +515,12 @@
498515
<plugin>
499516
<groupId>net.revelc.code.formatter</groupId>
500517
<artifactId>formatter-maven-plugin</artifactId>
501-
<version>2.17.1</version>
518+
<version>2.18.0</version>
502519
</plugin>
503520
<plugin>
504521
<groupId>org.apache.maven.plugins</groupId>
505522
<artifactId>maven-site-plugin</artifactId>
506-
<version>3.10.0</version>
523+
<version>3.12.0</version>
507524
<configuration>
508525
<skipDeploy>true</skipDeploy>
509526
</configuration>
@@ -528,12 +545,12 @@
528545
<plugin>
529546
<groupId>org.apache.maven.plugins</groupId>
530547
<artifactId>maven-project-info-reports-plugin</artifactId>
531-
<version>3.2.1</version>
548+
<version>3.2.2</version>
532549
</plugin>
533550
<plugin>
534551
<groupId>org.apache.maven.plugins</groupId>
535552
<artifactId>maven-javadoc-plugin</artifactId>
536-
<version>3.3.2</version>
553+
<version>3.4.0</version>
537554
<configuration>
538555
<quiet>true</quiet>
539556
<doclint>all,-missing</doclint>
@@ -560,7 +577,7 @@
560577
<plugin>
561578
<groupId>org.codehaus.mojo</groupId>
562579
<artifactId>versions-maven-plugin</artifactId>
563-
<version>2.9.0</version>
580+
<version>2.10.0</version>
564581
</plugin>
565582
<plugin>
566583
<groupId>org.codehaus.mojo</groupId>
@@ -593,12 +610,12 @@
593610
<plugin>
594611
<groupId>org.apache.maven.plugins</groupId>
595612
<artifactId>maven-dependency-plugin</artifactId>
596-
<version>3.1.2</version>
613+
<version>3.3.0</version>
597614
</plugin>
598615
<plugin>
599616
<groupId>org.jacoco</groupId>
600617
<artifactId>jacoco-maven-plugin</artifactId>
601-
<version>0.8.7</version>
618+
<version>0.8.8</version>
602619
<configuration>
603620
<excludes>
604621
<exclude>de/funfried/netbeans/plugins/external/formatter/**/Bundle.class</exclude>
@@ -614,22 +631,44 @@
614631
<plugin>
615632
<groupId>org.apache.maven.plugins</groupId>
616633
<artifactId>maven-jxr-plugin</artifactId>
617-
<version>3.1.1</version>
634+
<version>3.2.0</version>
618635
</plugin>
619636
<plugin>
620637
<groupId>org.apache.maven.plugins</groupId>
621638
<artifactId>maven-pmd-plugin</artifactId>
622-
<version>3.15.0</version>
639+
<version>3.16.0</version>
640+
<dependencies>
641+
<dependency>
642+
<groupId>net.sourceforge.pmd</groupId>
643+
<artifactId>pmd-core</artifactId>
644+
<version>${pmd.version}</version>
645+
</dependency>
646+
<dependency>
647+
<groupId>net.sourceforge.pmd</groupId>
648+
<artifactId>pmd-java</artifactId>
649+
<version>${pmd.version}</version>
650+
</dependency>
651+
<dependency>
652+
<groupId>net.sourceforge.pmd</groupId>
653+
<artifactId>pmd-javascript</artifactId>
654+
<version>${pmd.version}</version>
655+
</dependency>
656+
<dependency>
657+
<groupId>net.sourceforge.pmd</groupId>
658+
<artifactId>pmd-jsp</artifactId>
659+
<version>${pmd.version}</version>
660+
</dependency>
661+
</dependencies>
623662
</plugin>
624663
<plugin>
625664
<groupId>com.github.spotbugs</groupId>
626665
<artifactId>spotbugs-maven-plugin</artifactId>
627-
<version>4.5.3.0</version>
666+
<version>4.6.0.0</version>
628667
</plugin>
629668
<plugin>
630669
<groupId>org.owasp</groupId>
631670
<artifactId>dependency-check-maven</artifactId>
632-
<version>6.5.3</version>
671+
<version>7.1.0</version>
633672
<configuration>
634673
<assemblyAnalyzerEnabled>false</assemblyAnalyzerEnabled>
635674
</configuration>
@@ -896,7 +935,7 @@
896935
<plugin>
897936
<groupId>com.h3xstream.findsecbugs</groupId>
898937
<artifactId>findsecbugs-plugin</artifactId>
899-
<version>1.11.0</version>
938+
<version>1.12.0</version>
900939
</plugin>
901940
</plugins>
902941
</configuration>

0 commit comments

Comments
 (0)