forked from mrousavy/react-native-vision-camera
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Devops: KTLint to lint Kotlin code (mrousavy#6)
* Adds KTLint as a GitHub action * Adds KTLint to the gradle project for IDE integration * Adds .editorconfig to configure KTLint (android/)
- Loading branch information
Showing
31 changed files
with
1,254 additions
and
1,211 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 |
---|---|---|
|
@@ -7,10 +7,12 @@ on: | |
paths: | ||
- '.github/workflows/validate-android.yml' | ||
- 'android/**' | ||
- '.editorconfig' | ||
pull_request: | ||
paths: | ||
- '.github/workflows/validate-android.yml' | ||
- 'android/**' | ||
- '.editorconfig' | ||
|
||
jobs: | ||
lint: | ||
|
@@ -32,3 +34,12 @@ jobs: | |
- uses: yutailang0119/[email protected] | ||
with: | ||
xml_path: android/build/reports/lint-results.xml | ||
ktlint: | ||
name: Kotlin Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Run KTLint | ||
uses: mrousavy/[email protected] | ||
with: | ||
github_token: ${{ secrets.github_token }} |
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,5 @@ | ||
[*.{kt,kts}] | ||
indent_size=2 | ||
insert_final_newline=true | ||
max_line_length=off | ||
disabled_rules=no-wildcard-imports |
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,16 @@ | ||
# android | ||
|
||
This folder contains the Android-platform-specific code for react-native-vision-camera. | ||
|
||
## Prerequesites | ||
|
||
1. Install ktlint | ||
```sh | ||
brew install ktlint | ||
``` | ||
|
||
## Getting Started | ||
|
||
It is recommended that you work on the code using the Example project (`example/android/`), since that always includes the React Native header files, plus you can easily test changes that way. | ||
|
||
You can however still edit the library project here by opening this folder with Android Studio. |
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.