Skip to content
New issue

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

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

Already on GitHub? # to your account

Respecting @formatter:on|off #670

Closed
dibog opened this issue Dec 14, 2019 · 3 comments · Fixed by #1895
Closed

Respecting @formatter:on|off #670

dibog opened this issue Dec 14, 2019 · 3 comments · Fixed by #1895
Milestone

Comments

@dibog
Copy link

dibog commented Dec 14, 2019

Would it be possible that ktlint respect the @Formatter:on|off ?
It could check the content within the tags, but it should not format it.

@Tapchicoma
Copy link
Collaborator

Do you mean that the running lint should show errors, but running format should not modify it (though still show errors)?

@dibog
Copy link
Author

dibog commented Dec 14, 2019 via email

@nedtwigg
Copy link

If you're using ktlint through Spotless, we just added support for on/off tags in plugin-gradle 5.5.0 (like this) and plugin-maven 2.3.0 (like this).

paul-dingemans added a commit that referenced this issue Mar 28, 2023
@paul-dingemans paul-dingemans added this to the 0.49.0 milestone Mar 28, 2023
paul-dingemans added a commit that referenced this issue Mar 28, 2023
* Respect formatter tags when enabled

Closes #670
Closes #1163
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants