question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Introducing Kotlin linter checks in github actions

See original GitHub issue

Adding 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:closed
  • Created 2 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
FareesHussaincommented, May 17, 2021

Are you still working on this @FareesHussain ? If not I’d be happy to work on this.

I was waiting for response. I’ll create a pr now

0reactions
epicadkcommented, May 17, 2021

Are you still working on this @FareesHussain ? If not I’d be happy to work on this.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found