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

Empty line before primary constructor is not reported and formated-out #1004

Closed
marco89nish opened this issue Dec 10, 2020 · 0 comments · Fixed by #1005
Closed

Empty line before primary constructor is not reported and formated-out #1004

marco89nish opened this issue Dec 10, 2020 · 0 comments · Fixed by #1005

Comments

@marco89nish
Copy link

marco89nish commented Dec 10, 2020

Version 0.39.0 (or earlier) introduced unwanted newline before annotated primary constructor (see #970). While that is fixed, ktlint format doesn't remove the extra line and ktlint check doesn't report it as an issue. IJ reformat code option removes the line by default but ktlint doesn't.

Expected Behavior

Given code:

class A

constructor(a: Int)

check should report issue and format should remove empty line

Observed Behavior

check doesn't report the issue and format doesn't change the file.

Steps to Reproduce

Given above

Your Environment

  • Version of ktlint used: 0.40.0
  • Version of Gradle used (if applicable): 6.6.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant