Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Google Java Formatter as an action, and apply it. #485

Merged
merged 4 commits into from
Jun 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/workflows/java-formatter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Google Java Formatter

on:
push:
branches:
- master

jobs:

formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2 # v2 minimum required
# Recommended: latest versions of Google Java Format require JDK 11+
- uses: actions/setup-java@v1
with:
java-version: "11"
- uses: axel-op/googlejavaformat-action@v3
with:
args: "--replace"
2 changes: 2 additions & 0 deletions .github/workflows/scalaformatter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ jobs:
fetch-depth: 1
- name: Running scalafmt
uses: openlawteam/scalafmt-ci@v2
with:
args: ''
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
dist: xenial
dist: bionic
language: java

branches:
Expand Down
189 changes: 0 additions & 189 deletions config/checkstyle/scalastyle_config.xml

This file was deleted.

14 changes: 0 additions & 14 deletions config/checkstyle/suppressions.xml

This file was deleted.

49 changes: 0 additions & 49 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
<hadoop.version>2.7.4</hadoop.version>
<spark.version>3.0.0</spark.version>
<github.global.server>github</github.global.server>
<checkstyle.plugin.version>2.17</checkstyle.plugin.version>
<license.plugin.version>3.0</license.plugin.version>
<release.plugin.version>2.5.2</release.plugin.version>
<scm-provider-gitexe.plugin.version>1.9.5</scm-provider-gitexe.plugin.version>
Expand Down Expand Up @@ -171,54 +170,6 @@
</args>
</configuration>
</plugin>
<!-- For checkstyle. -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>${checkstyle.plugin.version}</version>
<configuration>
<includeTestSourceDirectory>true</includeTestSourceDirectory>
<consoleOutput>true</consoleOutput>
<logViolationsToConsole>true</logViolationsToConsole>
<failsOnError>true</failsOnError>
<failOnViolation>true</failOnViolation>
<violationSeverity>warning</violationSeverity>
<suppressionsLocation>config/checkstyle/suppressions.xml</suppressionsLocation>
</configuration>
<executions>
<execution>
<id>checkstyle</id>
<phase>verify</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- For scalastyle. -->
<plugin>
<groupId>org.scalastyle</groupId>
<artifactId>scalastyle-maven-plugin</artifactId>
<version>1.0.0</version>
<configuration>
<verbose>false</verbose>
<failOnViolation>true</failOnViolation>
<includeTestSourceDirectory>true</includeTestSourceDirectory>
<failOnWarning>false</failOnWarning>
<sourceDirectory>${project.basedir}/src/main/scala</sourceDirectory>
<testSourceDirectory>${project.basedir}/src/test/scala</testSourceDirectory>
<configLocation>${project.basedir}/config/checkstyle/scalastyle_config.xml</configLocation>
<outputFile>${project.basedir}/target/scalastyle-output.xml</outputFile>
<outputEncoding>UTF-8</outputEncoding>
</configuration>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- For license header enforcement. -->
<plugin>
<groupId>com.mycila</groupId>
Expand Down
Loading