Apply gradle task fail to fix Trailing spaces with ktlint
See original GitHub issueIf you are submitting a bug, please include the following:
When running spotlessCheck and later spotlessApply am getting this error
> ApiService.kt':
> Error on line: 82, column: 5
> Trailing space(s)
> java.lang.AssertionError: Error on line: 82, column: 5
> Trailing space(s)
> at com.diffplug.spotless.kotlin.KtLintStep$State.lambda$createFormat$0(KtLintStep.java:114)
> at com.sun.proxy.$Proxy89.invoke(Unknown Source)
I’m using square code style, so I have indentation of 2.
Even though I format the code and have trailing spaces on Android Studio disabled to remove any spaces.
Version
id "com.diffplug.gradle.spotless" version "3.14.0"
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:16 (10 by maintainers)
Top Results From Across the Web
Apply gradle task fail to fix Trailing spaces with ktlint
Apply gradle task fail to fix Trailing spaces with ktlint. ... When running spotlessCheck and later spotlessApply am getting this error
Read more >Ktlint
Most lint violations don't need to be fixed manually. ktlint has a built-in formatter which fixes violations when possible. Some violations can not...
Read more >android - Problems running ktlint from module - Stack Overflow
and run the task, I get this error: FAILURE: Build failed with an exception. What went wrong: Could not determine the dependencies of...
Read more >Supported hooks - pre-commit
add -trailing-comma - Automatically add trailing commas to calls and literals. ... git-check - Use git to check for conflict markers and core.whitespace...
Read more >jeremymailen / ktlint Download - JitPack
Add it in your root build.gradle at the end of repositories: ... No trailing whitespaces (id: no-trailing-spaces ); No Unit returns ( fun...
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
Thanks @jbduncan, I found it using the search bar.
I had similar issue with this code
changing to below format fixed the error