-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ktlint and apply proper formatting
- Loading branch information
Max K
committed
Feb 12, 2024
1 parent
8407f2f
commit bd28316
Showing
42 changed files
with
353 additions
and
321 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# https://editorconfig.org | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 4 | ||
max_line_length = 140 | ||
|
||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.{kt,kts}] | ||
ktlint_code_style = intellij_idea | ||
ktlint_standard_no-wildcard-imports = disabled | ||
ktlint_function_naming_ignore_when_annotated_with=Composable | ||
ij_kotlin_allow_trailing_comma = true | ||
ij_kotlin_allow_trailing_comma_on_call_site = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
max_line_length = unset | ||
|
||
[*.yml] | ||
indent_size = 2 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,9 +10,13 @@ permissions: | |
pull-requests: write | ||
|
||
jobs: | ||
ktlint: | ||
uses: ./ktlint.yml | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
needs: | ||
- ktlint | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
|
@@ -47,6 +51,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
if: github.ref == 'refs/heads/main' | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
|
@@ -56,4 +61,4 @@ jobs: | |
java-version: '17' | ||
distribution: 'temurin' | ||
- name: Generate and submit dependency graph | ||
uses: gradle/actions/dependency-submission@v3 | ||
uses: gradle/actions/dependency-submission@v3 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Ktlint | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
Ktlint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
- name: Setup JDK | ||
uses: actions/[email protected] | ||
with: | ||
java-version: '17' | ||
distribution: 'temurin' | ||
- name: Setup Gradle | ||
uses: gradle/actions/setup-gradle@v3 | ||
with: | ||
add-job-summary-as-pr-comment: never | ||
build-scan-publish: false | ||
- name: Run ktlint | ||
run: ./gradlew ktlintCheck | ||
- name: Upload report | ||
uses: github/codeql-action/upload-sarif@v3 | ||
with: | ||
sarif_file: ./app/build/reports/ktlint |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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
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
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
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
Oops, something went wrong.