Introducing Kotlin linter checks in github actions
See original GitHub issueAdding Ktlint linter for kotlin as a static GitHub check will reduce the code review period and improve code style
Found the following errors when checked with Ktlint 0.37.1^v
/home/farees/opensource/modernstorage/media/src/androidTest/java/com/google/modernstorage/media/ExampleInstrumentedTest.kt:1:1: File must end with a newline (\n)
/home/farees/opensource/modernstorage/media/src/main/java/com/google/modernstorage/media/CustomActivityResultContracts.kt:39:1: Needless blank line(s)
/home/farees/opensource/modernstorage/media/src/main/java/com/google/modernstorage/media/MediaCollection.kt:1:1: File must end with a newline (\n)
/home/farees/opensource/modernstorage/media/src/main/java/com/google/modernstorage/media/MediaCollection.kt:34:16: Missing spacing after "when"
/home/farees/opensource/modernstorage/media/src/main/java/com/google/modernstorage/media/MediaCollection.kt:41:16: Missing spacing after "when"
/home/farees/opensource/modernstorage/media/src/main/java/com/google/modernstorage/media/MediaCollection.kt:47:1: Needless blank line(s)
/home/farees/opensource/modernstorage/media/src/main/java/com/google/modernstorage/media/MediaCollection.kt:59:16: Missing spacing after "when"
/home/farees/opensource/modernstorage/media/src/main/java/com/google/modernstorage/media/MediaCollection.kt:66:16: Missing spacing after "when"
/home/farees/opensource/modernstorage/media/src/main/java/com/google/modernstorage/media/MediaQuery.kt:1:1: File must end with a newline (\n)
/home/farees/opensource/modernstorage/media/src/main/java/com/google/modernstorage/media/MediaResource.kt:1:1: File must end with a newline (\n)
/home/farees/opensource/modernstorage/media/src/main/java/com/google/modernstorage/media/MediaStoreClient.kt:1:1: File must end with a newline (\n)
/home/farees/opensource/modernstorage/media/src/main/java/com/google/modernstorage/media/MediaStoreClient.kt:19:1: Imports must be ordered in lexicographic order without any empty lines in-between
/home/farees/opensource/modernstorage/media/src/main/java/com/google/modernstorage/media/Permission.kt:1:1: File must end with a newline (\n)
/home/farees/opensource/modernstorage/media/src/main/java/com/google/modernstorage/media/StorageLocation.kt:1:1: File must end with a newline (\n)
/home/farees/opensource/modernstorage/media/src/main/java/com/google/modernstorage/media/StorageLocation.kt:23:1: Missing space after //
/home/farees/opensource/modernstorage/media/src/test/java/com/google/modernstorage/media/ExampleUnitTest.kt:1:1: File must end with a newline (\n)
/home/farees/opensource/modernstorage/sample/src/androidTest/java/com/google/modernstorage/sample/ExampleInstrumentedTest.kt:1:1: File must end with a newline (\n)
/home/farees/opensource/modernstorage/sample/src/main/java/com/google/modernstorage/sample/MainActivity.kt:1:1: File must end with a newline (\n)
/home/farees/opensource/modernstorage/sample/src/main/java/com/google/modernstorage/sample/MainActivity.kt:42:1: Unexpected indentation (16) (should be 12)
/home/farees/opensource/modernstorage/sample/src/main/java/com/google/modernstorage/sample/mediastore/MediaStoreFragment.kt:155:11: Missing spacing after "if"
/home/farees/opensource/modernstorage/sample/src/main/java/com/google/modernstorage/sample/mediastore/MediaStoreFragment.kt:161:1: Unexpected blank line(s) before "}"
/home/farees/opensource/modernstorage/sample/src/main/java/com/google/modernstorage/sample/mediastore/MediaStoreViewModel.kt:1:1: File must end with a newline (\n)
/home/farees/opensource/modernstorage/sample/src/main/java/com/google/modernstorage/sample/mediastore/MediaStoreViewModel.kt:58:15: Missing spacing after "if"
/home/farees/opensource/modernstorage/sample/src/main/java/com/google/modernstorage/sample/mediastore/SampleData.kt:1:1: File must end with a newline (\n)
/home/farees/opensource/modernstorage/sample/src/main/java/com/google/modernstorage/sample/mediastore/SampleData.kt:21:1: Exceeded max line length (100) (cannot be auto-corrected)
/home/farees/opensource/modernstorage/sample/src/main/java/com/google/modernstorage/sample/mediastore/SampleData.kt:22:1: Exceeded max line length (100) (cannot be auto-corrected)
/home/farees/opensource/modernstorage/sample/src/main/java/com/google/modernstorage/sample/mediastore/SampleData.kt:23:1: Exceeded max line length (100) (cannot be auto-corrected)
/home/farees/opensource/modernstorage/sample/src/main/java/com/google/modernstorage/sample/mediastore/SampleData.kt:24:1: Exceeded max line length (100) (cannot be auto-corrected)
/home/farees/opensource/modernstorage/sample/src/main/java/com/google/modernstorage/sample/mediastore/SampleData.kt:28:1: Exceeded max line length (100) (cannot be auto-corrected)
/home/farees/opensource/modernstorage/sample/src/main/java/com/google/modernstorage/sample/mediastore/SampleData.kt:29:1: Exceeded max line length (100) (cannot be auto-corrected)
/home/farees/opensource/modernstorage/sample/src/main/java/com/google/modernstorage/sample/mediastore/SampleData.kt:30:1: Exceeded max line length (100) (cannot be auto-corrected)
/home/farees/opensource/modernstorage/sample/src/main/java/com/google/modernstorage/sample/mediastore/SampleData.kt:31:1: Exceeded max line length (100) (cannot be auto-corrected)
/home/farees/opensource/modernstorage/sample/src/test/java/com/google/modernstorage/sample/ExampleUnitTest.kt:1:1: File must end with a newline (\n)
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Android Lint and Detekt warnings in GitHub pull requests
Check out how relatively easy it is to set up Detekt and Android Lint warnings so that they are displayed directly in pull...
Read more >Kotlin Linter · Actions · GitHub Marketplace
This GitHub action runs the Kotlin Linter, ktlint. Inputs. patterns. Optional A list of patterns to pass along to the ktlint ...
Read more >The Making of Android Lint Reporter — _junrong - Bloggie.io
Android Lint Reporter Github Actions was recently introduced, that means we can run some jobs without using a separate third party CI.
Read more >Android Continuous Integration (CI) using Ktlint and GitHub ...
Run Android linter ( check for Android related issues). Run Unit test. To create a GitHub action, head into the project view in...
Read more >Building an Android CI Pipeline with GitHub Actions // Chicago ...
Learn to build a multi-functional continuous integration pipeline for Android using GitHub Actions. We'll walk through the building of an ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I was waiting for response. I’ll create a pr now
Are you still working on this @FareesHussain ? If not I’d be happy to work on this.