Skip to content

Commit

Permalink
chore: Add lint checker to github action workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
PENEKhun committed Jan 27, 2024
1 parent f50e59f commit 73e5b60
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/build-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ jobs:
- name: Set up Gradle
uses: gradle/gradle-build-action@v2

- name: Build with Gradle
run: ./gradlew build

- uses: jwgmeligmeyling/checkstyle-github-action@master
with:
path: '**/checkstyle-result.xml'

- name: Upload build reports
uses: actions/upload-artifact@v4
if: failure()
Expand Down
11 changes: 8 additions & 3 deletions lint.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,13 @@ subprojects {
configFile = rootProject.file('config/checkstyle/checkstyle.xml')
}

tasks.register('lint') {
group = 'verification'
dependsOn checkstyleMain, checkstyleTest
tasks.withType(Checkstyle).tap {
configureEach {
reports {
xml {
destination = file("$buildDir/reports/checkstyle/checkstyle-result.xml")
}
}
}
}
}

0 comments on commit 73e5b60

Please sign in to comment.