Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kltint fails for indents using 2 interfaces #1003

Closed
neugartf opened this issue Dec 9, 2020 · 2 comments · Fixed by #1006
Closed

kltint fails for indents using 2 interfaces #1003

neugartf opened this issue Dec 9, 2020 · 2 comments · Fixed by #1006

Comments

@neugartf
Copy link

neugartf commented Dec 9, 2020

Hey! Not entirely sure who is wrong here, either the auto-format from IntelliJ or ktlint. Weird thing is that ktlint succeeds if i reduce it to one interface.

Expected Behavior

Ktlint shouldn't not complain about the indention. Unexpected indentation (4) (should be 8) (indent)
https://kotlinlang.org/docs/reference/coding-conventions.html#class-header-formatting

Observed Behavior

Ktlint fails with Unexpected indentation (4) (should be 8) (indent).

Steps to Reproduce

  1. Checkout http://github.com/neugartf/ktlint-gradle
  2. Set Kotlin Coding Conventions as default for the project
  3. Run :samples:kotlin-gradle:ktlintMainSourceSetCheck

Your Environment

  • Version of ktlint used: 0.40.0
  • Name and version (or code for custom task) of integration used (Gradle plugin, Maven plugin, command line, custom Gradle task): JLLeitschuh/ktlint-gradle@10509e9
  • Version of Gradle used (if applicable): gradle-6.6.1
  • Operating System and version: MacOS 10.15.7
  • Link to your project (if it's a public repository): https://github.com/neugartf/ktlint-gradle
@t-kameyama
Copy link
Contributor

I think #961 is the cause of this issue.

@neugartf
Copy link
Author

Thanks for the quick fix, wanted to provide one during the weekend, but you are really fast :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants