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

Cannot disable rule: Missing newline after "=" #862

Closed
alex-gunning-jumo opened this issue Aug 27, 2020 · 2 comments
Closed

Cannot disable rule: Missing newline after "=" #862

alex-gunning-jumo opened this issue Aug 27, 2020 · 2 comments

Comments

@alex-gunning-jumo
Copy link

The bug you're experiencing might have already be reported!
Please search in the issues before creating one.

Expected Behavior

Rule should be disabled and linting should pass.

Observed Behavior

Cannot disable Missing newline after "=" rule via either of the following methods.


val expectedMessage = """something""" // ktlint-disable


/* ktlint-disable */

val expectedMessage = """something"""

/* ktlint-enable */


Steps to Reproduce

Your Environment

  • Version of ktlint used:
    Version 0.38.1
    (Also present in version 0.37.2)

  • Name and version (or code for custom task) of integration used (Gradle plugin, Maven plugin, command line, custom Gradle task):

      Maven plugin on 0.38.1 and 0.37.2 and CLI version 0.38.1 on Mac
    
  • Operating System and version:
    Mac OS Mojave

@romtsn
Copy link
Collaborator

romtsn commented Aug 27, 2020

Yeah, that's an unfortunate consequence of indentation rule running only over the entire file. You'd have to disable it for the entire file. Or just hold off until next version of ktlint, where the fix is included (see #849)

@romtsn romtsn closed this as completed Aug 27, 2020
@alex-gunning-jumo
Copy link
Author

I see. Thanks for your response :)

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

No branches or pull requests

2 participants