Skip to content

Commit

Permalink
style: format with google java style guide
Browse files Browse the repository at this point in the history
  • Loading branch information
sitepark-veltrup committed Feb 7, 2024
1 parent b5ad696 commit 9276172
Show file tree
Hide file tree
Showing 103 changed files with 6,014 additions and 6,374 deletions.
119 changes: 0 additions & 119 deletions checkstyle.xml

This file was deleted.

137 changes: 91 additions & 46 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
<?xml version="1.0"?>
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

<modelVersion>4.0.0</modelVersion>

<groupId>com.sitepark</groupId>
<artifactId>translate-api</artifactId>
<packaging>jar</packaging>
<version>2.1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Translate Java API</name>
<description>Java API for translating texts across different providers</description>
<url>https://github.com/sitepark/translate-api</url>

<organization>
<name>Sitepark</name>
<url>https://www.sitepark.com</url>
</organization>

<licenses>
<license>
<name>The MIT License</name>
<url>https://opensource.org/licenses/MIT</url>
</license>
</licenses>

<organization>
<name>Sitepark</name>
<url>https://www.sitepark.com</url>
</organization>

<developers>
<developer>
<id>veltrup@sitepark</id>
Expand All @@ -38,6 +38,13 @@
</developer>
</developers>

<scm>
<connection>scm:git:git@github.com:sitepark/translate-api.git</connection>
<developerConnection>scm:git:git@github.com:sitepark/translate-api.git</developerConnection>
<tag>HEAD</tag>
<url>https://github.com/sitepark/translate-api</url>
</scm>

<properties>
<junit.version>5.10.2</junit.version>
<jackson.version>2.16.1</jackson.version>
Expand All @@ -47,13 +54,6 @@
<gpg.skip>true</gpg.skip>
</properties>

<scm>
<connection>scm:git:git@github.com:sitepark/translate-api.git</connection>
<developerConnection>scm:git:git@github.com:sitepark/translate-api.git</developerConnection>
<url>https://github.com/sitepark/translate-api</url>
<tag>HEAD</tag>
</scm>

<dependencyManagement>
<dependencies>
<dependency>
Expand Down Expand Up @@ -132,10 +132,10 @@
<executions>
<execution>
<id>add-integration-test-sources</id>
<phase>generate-test-sources</phase>
<goals>
<goal>add-test-source</goal>
</goals>
<phase>generate-test-sources</phase>
<configuration>
<sources>
<source>src/integration-test/java</source>
Expand Down Expand Up @@ -169,10 +169,10 @@
<executions>
<execution>
<id>assemble-all</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<phase>package</phase>
</execution>
</executions>
</plugin>
Expand All @@ -189,10 +189,10 @@
</execution>
<execution>
<id>integration-test</id>
<phase>integration-test</phase>
<goals>
<goal>test</goal>
</goals>
<phase>integration-test</phase>
<configuration>
<groups>IntegrationTest</groups>
</configuration>
Expand Down Expand Up @@ -232,18 +232,18 @@
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
<phase>verify</phase>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-release-plugin</artifactId>
<version>3.0.1</version>
<configuration>
<scmCommentPrefix>ci(release): </scmCommentPrefix>
<scmCommentPrefix>ci(release):</scmCommentPrefix>
<tagNameFormat>@{project.version}</tagNameFormat>
</configuration>
</plugin>
Expand Down Expand Up @@ -279,46 +279,82 @@
</execution>
<execution>
<id>generate-code-coverage-report</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
<phase>test</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.3.1</version>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>2.43.0</version>
<configuration>
<configLocation>checkstyle.xml</configLocation>
<inputEncoding>UTF-8</inputEncoding>
<consoleOutput>true</consoleOutput>
<failsOnError>true</failsOnError>
<linkXRef>false</linkXRef>
<!-- define a language-specific format -->
<java>
<removeUnusedImports>
<engine>google-java-format</engine>
</removeUnusedImports>

<!-- apply a specific flavor of google-java-format and reflow long strings -->
<googleJavaFormat>
<version>1.19.2</version>
<style>GOOGLE</style>
<reflowLongStrings>true</reflowLongStrings>
<formatJavadoc>false</formatJavadoc>
</googleJavaFormat>
<formatAnnotations></formatAnnotations>
</java>
<pom>
<!-- These are the defaults, you can override if you want -->
<includes>
<include>pom.xml</include>
</includes>
<sortPom>
<!-- value of -1 indicates that a tab character should be used instead -->
<nrOfIndentSpace>-1</nrOfIndentSpace>
</sortPom>
</pom>
</configuration>
<executions>
<execution>
<id>checkstyle</id>
<phase>verify</phase>
<id>spotless-check</id>
<goals>
<goal>check</goal>
</goals>
<phase>verify</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<versionRange></versionRange>
<goals>
<goal>check</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<version>4.8.3.0</version>
<executions>
<execution>
<phase>verify</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
<configuration>
<effort>Max</effort>
<threshold>Low</threshold>
Expand All @@ -335,20 +371,19 @@
<version>${spotbugs.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>3.21.2</version>
<executions>
<execution>
<id>pmd</id>
<phase>verify</phase>
<goals>
<goal>check</goal>
</goals>
<phase>verify</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>3.21.2</version>
<configuration>
<rulesets>
<ruleset>pmd-ruleset.xml</ruleset>
Expand All @@ -357,8 +392,18 @@
<failOnViolation>true</failOnViolation>
<failurePriority>5</failurePriority>
<printFailingErrors>true</printFailingErrors>
<linkXRef>false</linkXRef> <!-- otherwise generates a warning -->
<linkXRef>false</linkXRef>
<!-- otherwise generates a warning -->
</configuration>
<executions>
<execution>
<id>pmd</id>
<goals>
<goal>check</goal>
</goals>
<phase>verify</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
Expand Down
Loading

0 comments on commit 9276172

Please sign in to comment.