Skip to content

Commit bd1d769

Browse files
authored
feat: Modernize (#238)
* compile w/ cloud-core Should enable Junit Rules from cloud-core * update google_checks & metadata Update to latest version * Revert "update google_checks & metadata" This reverts commit 20bba56. * Update to latest google_checks.xml Well, mostly the latest, some things seem to break. BraceAdjustment from 0->2 was uncommented, so I'm accepting it. We add RecordComponentName & MissingJavaDocType. * Chore: update pom * Emily instead of Dane * make release easier
1 parent d64efc8 commit bd1d769

File tree

4 files changed

+78
-12
lines changed

4 files changed

+78
-12
lines changed

checkstyle-config/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ limitations under the License.
6363
<organizationUrl>https://cloud.google.com</organizationUrl>
6464
</developer>
6565
<developer>
66-
<name>Dane Zeke Liergaard</name>
67-
<email>dzlier@google.com</email>
66+
<name>Emily Ball</name>
67+
<email>emilyball@google.com</email>
6868
<organization>Google Inc.</organization>
6969
<organizationUrl>https://cloud.google.com</organizationUrl>
7070
</developer>

pom.xml

Lines changed: 53 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ limitations under the License.
2626
<maven-release-plugin>2.5.3</maven-release-plugin><!-- could be 3.0.0-M1 -->
2727
<maven-compiler-plugin>3.8.1</maven-compiler-plugin>
2828
<nexus-staging-maven-plugin>1.6.8</nexus-staging-maven-plugin>
29-
<versions-maven-plugin>2.7</versions-maven-plugin>
29+
<versions-maven-plugin>2.8.1</versions-maven-plugin>
3030
<maven-gpg-plugin>1.6</maven-gpg-plugin>
3131
<pmdVersion>6.33.0</pmdVersion>
3232
<skipTests>false</skipTests>
@@ -72,8 +72,8 @@ limitations under the License.
7272
<organizationUrl>https://cloud.google.com</organizationUrl>
7373
</developer>
7474
<developer>
75-
<name>Dane Zeke Liergaard</name>
76-
<email>dzlier@google.com</email>
75+
<name>Emily Ball</name>
76+
<email>emilyball@google.com</email>
7777
<organization>Google Inc.</organization>
7878
<organizationUrl>https://cloud.google.com</organizationUrl>
7979
</developer>
@@ -324,7 +324,50 @@ limitations under the License.
324324
</executions>
325325
</plugin>
326326

327+
<plugin>
328+
<groupId>org.sonatype.plugins</groupId>
329+
<artifactId>nexus-staging-maven-plugin</artifactId>
330+
<inherited>false</inherited>
331+
</plugin>
332+
<plugin>
333+
<groupId>org.apache.maven.plugins</groupId>
334+
<artifactId>maven-release-plugin</artifactId>
335+
<inherited>false</inherited>
336+
</plugin>
337+
327338
</plugins>
339+
340+
<pluginManagement>
341+
<plugins>
342+
<!-- Plugins for release. See: http://central.sonatype.org/pages/apache-maven.html -->
343+
<plugin>
344+
<groupId>org.sonatype.plugins</groupId>
345+
<artifactId>nexus-staging-maven-plugin</artifactId>
346+
<version>${nexus-staging-maven-plugin}</version>
347+
<extensions>true</extensions>
348+
<configuration>
349+
<serverId>ossrh</serverId>
350+
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
351+
<autoReleaseAfterClose>true</autoReleaseAfterClose>
352+
<stagingProfileId>2145015f0f5c04</stagingProfileId>
353+
</configuration>
354+
</plugin>
355+
<plugin>
356+
<groupId>org.apache.maven.plugins</groupId>
357+
<artifactId>maven-release-plugin</artifactId>
358+
<version>${maven-release-plugin}</version>
359+
<configuration>
360+
<tagBase>scm:git:ssh://[email protected]/GoogleCloudPlatform/java-repo-tools.git</tagBase>
361+
<tagNameFormat>checkstyle-config-v@{project.version}</tagNameFormat>
362+
<useReleaseProfile>false</useReleaseProfile>
363+
<releaseProfiles>release</releaseProfiles>
364+
<goals>deploy</goals>
365+
</configuration>
366+
</plugin>
367+
</plugins>
368+
</pluginManagement>
369+
370+
328371
</build>
329372
</profile>
330373
</profiles>
@@ -336,6 +379,13 @@ limitations under the License.
336379
<version>4.2.2</version>
337380
<optional>true</optional>
338381
</dependency>
382+
<dependency>
383+
<groupId>com.google.cloud</groupId>
384+
<artifactId>google-cloud-core</artifactId>
385+
<version>1.94.4</version>
386+
<scope>test</scope>
387+
<classifier>tests</classifier>
388+
</dependency>
339389
</dependencies>
340390

341391
<build>

third_party/checkstyle/METADATA

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ third_party {
1414
value: "https://github.com/checkstyle/checkstyle"
1515
}
1616
version: "8.36.1"
17-
last_upgrade_date { year: 2020 month: 9 day: 22 }
18-
local_modifications: "RegexpHeader, severity, SupressWaringsHolder, and SuppressionCommentFilter"
17+
last_upgrade_date { year: 2021 month: 4 day: 05 }
18+
local_modifications:
19+
"RegexpHeader, severity(error), SupressWaringsHolder, SuppressionCommentFilter, "
20+
"SingleLineJavadoc(ignoreInlineTags), and SuppressionCommentFilter"
21+
1922
}

third_party/checkstyle/google_checks.xml

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -165,13 +165,13 @@
165165
<property name="option" value="EOL"/>
166166
</module>
167167
<module name="SeparatorWrap">
168-
<!-- ELLIPSIS is EOL until https://github.com/google/styleguide/issues/258 -->
168+
<!-- ELLIPSIS is EOL until https://github.com/google/styleguide/issues/259 -->
169169
<property name="id" value="SeparatorWrapEllipsis"/>
170170
<property name="tokens" value="ELLIPSIS"/>
171171
<property name="option" value="EOL"/>
172172
</module>
173173
<module name="SeparatorWrap">
174-
<!-- ARRAY_DECLARATOR is EOL until https://github.com/google/styleguide/issues/259 -->
174+
<!-- ARRAY_DECLARATOR is EOL until https://github.com/google/styleguide/issues/258 -->
175175
<property name="id" value="SeparatorWrapArrayDeclarator"/>
176176
<property name="tokens" value="ARRAY_DECLARATOR"/>
177177
<property name="option" value="EOL"/>
@@ -227,6 +227,11 @@
227227
<message key="name.invalidPattern"
228228
value="Class type name ''{0}'' must match pattern ''{1}''."/>
229229
</module>
230+
<module name="RecordComponentName">
231+
<property name="format" value="^[a-z]([a-z0-9][a-zA-Z0-9]*)?$"/>
232+
<message key="name.invalidPattern"
233+
value="Record component name ''{0}'' must match pattern ''{1}''."/>
234+
</module>
230235
<module name="RecordTypeParameterName">
231236
<property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
232237
<message key="name.invalidPattern"
@@ -255,7 +260,7 @@
255260
</module>
256261
<module name="Indentation">
257262
<property name="basicOffset" value="2"/>
258-
<property name="braceAdjustment" value="0"/>
263+
<property name="braceAdjustment" value="2"/>
259264
<property name="caseIndent" value="2"/>
260265
<property name="throwsIndent" value="4"/>
261266
<property name="lineWrappingIndentation" value="4"/>
@@ -299,8 +304,9 @@
299304
<module name="OperatorWrap">
300305
<property name="option" value="NL"/>
301306
<property name="tokens"
302-
value="BAND, BOR, BSR, BXOR, DIV, EQUAL, GE, GT, LAND, LE, LITERAL_INSTANCEOF, LOR,
303-
LT, MINUS, MOD, NOT_EQUAL, PLUS, QUESTION, SL, SR, STAR, METHOD_REF "/>
307+
value="BAND, BOR, BSR, BXOR, DIV, EQUAL, GE, GT, LAND, LE, LITERAL_INSTANCEOF, LOR,
308+
LT, MINUS, MOD, NOT_EQUAL, PLUS, QUESTION, SL, SR, STAR, METHOD_REF,
309+
TYPE_EXTENSION_AND "/>
304310
</module>
305311
<module name="AnnotationLocation">
306312
<property name="id" value="AnnotationLocationMostCases"/>
@@ -341,6 +347,13 @@
341347
<property name="tokens" value="METHOD_DEF, CTOR_DEF, ANNOTATION_FIELD_DEF,
342348
COMPACT_CTOR_DEF"/>
343349
</module>
350+
<module name="MissingJavadocType">
351+
<property name="scope" value="protected"/>
352+
<property name="tokens"
353+
value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF,
354+
RECORD_DEF, ANNOTATION_DEF"/>
355+
<property name="excludeScope" value="nothing"/>
356+
</module>
344357
<module name="MethodName">
345358
<property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9_]*$"/>
346359
<message key="name.invalidPattern"

0 commit comments

Comments
 (0)