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

Improve handling of trailing whitespace in API dump files #133

Open
aSemy opened this issue May 1, 2023 · 2 comments · May be fixed by #192
Open

Improve handling of trailing whitespace in API dump files #133

aSemy opened this issue May 1, 2023 · 2 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?

@JakeWharton JakeWharton linked a pull request Mar 14, 2024 that will close this issue
@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
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.

4 participants