Skip to content

Commit

Permalink
add ktfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
tanneberger committed Feb 7, 2025
1 parent 11a84a7 commit 3e1b10b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/formating.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ jobs:
run: |
clang-format --version
make format-check
- name: LFC format check
run: cd lfc && ./gradlew spotlessCheck

- name: ktfmt format check
run: cd lfc && ./gradlew ktfmt
14 changes: 2 additions & 12 deletions lfc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,8 @@ plugins {
}

spotless {
format 'misc', {
target rootProject.fileTree(rootProject.rootDir) {
include '**/*.gradle', '**/*.md', '.gitignore', '**/*.yml', '**/*.sh', '**/*.psi', '**/uc/**'
exclude '**/reactor-cpp/**', '**/reactor-c/**', '**/reactor-rs/**', '**/lf-python-support/**',
'**/src-gen/**', '**/fed-gen/**', '**/test-gen/**', '**/build/**',
'test/*/include', 'test/*/bin/', 'test/*/share', 'test/*/lib'
}

// define the steps to apply to those files
trimTrailingWhitespace()
indentWithSpaces(2) // or spaces. Takes an integer argument if you don't like 4
endWithNewline()
kotlin {
ktfmt('0.54').kotlinlangStyle()
}
}

Expand Down

0 comments on commit 3e1b10b

Please sign in to comment.