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

fix:Made some changes so that errors show up during ktlint pr review #79

Merged
merged 10 commits into from
Sep 5, 2024
Merged
Prev Previous commit
Next Next commit
Switch to baseline ktlint and detekt check + set ktlint standards
andrewtavis authored and angrezichatterbox committed Sep 5, 2024
commit e0d8a38bbff502868ade02ff0648512785fe9311
8 changes: 5 additions & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
# EditorConfig
# http://EditorConfig.org

# top-most EditorConfig file
# Top-most EditorConfig file.
root = true

# LF end-of-line, insert an empty new line and UTF-8
# LF end-of-line, insert an empty new line and UTF-8.
[*]
end_of_line = lf
insert_final_newline = true
@@ -20,3 +19,6 @@ continuation_indent_size = 4
[*.kt]
ij_kotlin_name_count_to_use_star_import = 5
ij_kotlin_name_count_to_use_star_import_for_members = 5

ktlint_code_style = ktlint_official
ktlint_standard = enabled
23 changes: 0 additions & 23 deletions .github/workflows/pr_ktlint.yaml

This file was deleted.

31 changes: 31 additions & 0 deletions .github/workflows/pr_ktlint_detekt.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: pr_ktlint_detekt
on:
pull_request:
branches:
- main
types: [opened, reopened, synchronize]

jobs:
ktlint:
runs-on: ubuntu-latest
name: Run ktlint and detekt

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

- name: Setup JDK environment
uses: actions/setup-java@v4
with:
distribution: "zulu"
java-version: 17

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4

- name: Run ktlint
run: ./gradlew lintKotlin

- name: Run detekt
if: always()
run: ./gradlew detekt