Skip to content

Commit 2916d51

Browse files
authored
Merge pull request #12 from code4tomorrow/checkstyle
Bump checkstyle action to 0.3.1, mod google checks
2 parents d36ed92 + 0274cd7 commit 2916d51

File tree

4 files changed

+392
-30
lines changed

4 files changed

+392
-30
lines changed

.github/workflows/java-checkstyle.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.

.github/workflows/java-prettier.yml renamed to .github/workflows/java.yml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Uses: https://github.com/marketplace/actions/prettier-java-action
22
# Auto formats code using Prettier
3-
name: Java (Prettier)
3+
# Uses: https://github.com/marketplace/actions/run-java-checkstyle
4+
# Submits review annotations based on checkstyle errors
5+
6+
name: Java Style
47

58
on: pull_request
69

@@ -28,3 +31,22 @@ jobs:
2831
commit_message: 'Bot: Prettified Java code!'
2932
env:
3033
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34+
35+
checkstyle:
36+
name: Java Checkstyle
37+
runs-on: ubuntu-latest
38+
needs: prettify
39+
40+
steps:
41+
- name: Check out Git repository
42+
uses: actions/checkout@v2
43+
44+
- name: Run checkstyle with reviewdog
45+
uses: nikitasavinov/checkstyle-action@master
46+
with:
47+
github_token: ${{ secrets.GITHUB_TOKEN }}
48+
reporter: github-pr-review # submit review comments based on reviewdog findings
49+
filter_mode: file # report on anything that is in an added/modified file
50+
fail_on_error: true
51+
checkstyle_config: google_checks_mod.xml
52+
workdir: src/com/codefortomorrow # working dir relative to root dir

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,4 @@
33

44
# ignore files
55
c4t-java.iml
6-
*.xml
76
.DS_Store

0 commit comments

Comments
 (0)