This repository has been archived by the owner on Jan 2, 2024. It is now read-only.
ktlint #1882
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ktlint | |
on: | |
pull_request: | |
branches: [master] | |
merge_group: | |
types: [checks_requested] | |
jobs: | |
ktlint_checks: | |
name: 'ktlint checks' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'adopt' | |
cache: 'gradle' | |
- name: Run ktlint checks | |
run: | | |
cd backend | |
./gradlew loadKtlintReporters | |
# For *.kts files | |
./gradlew runKtlintCheckOverKotlinScripts | |
./gradlew ktlintKotlinScriptCheck | |
# For *.kt files in /src/main | |
./gradlew runKtlintCheckOverMainSourceSet | |
./gradlew ktlintMainSourceSetCheck | |
# For *.kt files in /src/test | |
./gradlew runKtlintCheckOverTestSourceSet | |
./gradlew ktlintTestSourceSetCheck |