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

feat: add kotlin linting workflow #73

Merged
merged 2 commits into from
Aug 28, 2024
Merged
Changes from 1 commit
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
34 changes: 34 additions & 0 deletions .github/workflows/pr_kotlinlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: pr_kotlinlint
on:
pull_request:
branches:
- main
types: [opened, reopened, synchronize]

jobs:
lint:
name: Run KotlinLint
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'zulu'

- name: Install ktlint
run: curl -sSLO https://github.com/pinterest/ktlint/releases/download/0.45.2/ktlint && chmod a+x ktlint

- name: Run ktlint
run: ./ktlint --relative "**/*.kt" --reporter=checkstyle,output=ktlint-checkstyle-report.xml || echo "ktlint found issues"

- name: Upload lint reports
if: failure()
uses: actions/upload-artifact@v3
with:
name: lint-results
path: ./ktlint-checkstyle-report.xml
Loading