Skip to content

Commit 9f2e3f4

Browse files
committed
add workflow to check code style and modify violationSeverity
1 parent 1832346 commit 9f2e3f4

2 files changed

Lines changed: 22 additions & 1 deletion

File tree

.github/workflows/checkstyle.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# This workflow will build a Java project with Maven
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
3+
4+
name: Java Code Style Check with Maven
5+
6+
on: [push]
7+
8+
jobs:
9+
build:
10+
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: Set up JDK 1.8
16+
uses: actions/setup-java@v1
17+
with:
18+
java-version: 1.8
19+
- name: Code Style Check
20+
run: mvn -B validate --file pom.xml

pom.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,10 +181,11 @@
181181
<version>${maven.checkstyle.plugin.version}</version>
182182
<configuration>
183183
<configLocation>google_checks.xml</configLocation>
184+
<violationSeverity>warning</violationSeverity>
184185
<suppressionsLocation>checkstyle-suppressions.xml</suppressionsLocation>
185186
<suppressionsFileExpression>checkstyle.suppressions.file</suppressionsFileExpression>
186187
<consoleOutput>true</consoleOutput>
187-
<failsOnError>true</failsOnError>
188+
<failsOnError>false</failsOnError>
188189
</configuration>
189190
<executions>
190191
<execution>

0 commit comments

Comments
 (0)