Skip to content

Improve handling of trailing whitespace in API dump files #133

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

Closed
aSemy opened this issue May 1, 2023 · 3 comments · May be fixed by #192
Closed

Improve handling of trailing whitespace in API dump files #133

aSemy opened this issue May 1, 2023 · 3 comments · May be fixed by #192
Labels
enhancement New feature or request jvm

Comments

@aSemy
Copy link
Contributor

aSemy commented May 1, 2023

Currently, any API dump that BCV produces contains two trailing whitespaces lines, \n\n.

I have enabled 'strip trailing whitespace' in IntelliJ https://stackoverflow.com/questions/20679842/remove-trailing-whitespace-on-save-in-intellij-idea-12

When I open a .api file, which might automatically happen during a commit dialog, IntelliJ will replace the two trailing \n\n with a single \n. This is annoying, because then BCV will fail the test.

Other editors might also have problems with different types of behaviour that are difficult to predict or control.

Could BCV be changed to ignore any difference in trailing whitespace?

@hfhbd
Copy link

hfhbd commented May 19, 2023

What about just removing the last whitespace?

@lukellmann
Copy link

I'd appreciate this too, I also have my IntelliJ set up this way. For me this mostly comes up during merges.

Removing the last \n seems like the best option, then IntelliJ and BCV won't fight over this and there won't be trails of this in the commit history.

@fzhinkin fzhinkin added enhancement New feature or request jvm labels Apr 9, 2024
@shanshin
Copy link
Contributor

shanshin commented Jun 3, 2025

As part of the migration of separate BCV functionality to Kotlin Gradle Plugin, the addition of new features to a separate plugin has been discontinued.

It will be developed a format that eliminates this problem there: https://youtrack.jetbrains.com/issue/KT-78009

@shanshin shanshin closed this as completed Jun 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request jvm
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants