Trailing whitespaces in Eclipse

Published by Tobias Hofmann on

1 min read

SonarQube is not only good in telling you that you have a tab indentation problem, but also shows that you have a lot of white spaces that make no sense: trailing white spaces at the end of a line.

How do you get rid of these in Eclipse?

You can configure Eclipse to delete trailing white spaces when you save the file.

Go to Windows -> Preferences -> Javascript -> Editor -> Save Actions

Activate “Perform the selected actions on save” and then “Additional actions” and select “Configure…

Switch to tab “Code Organizing

Confirm your choices by clicking OK. Afterwards the additional actions sections contains your selected save actions:

Every time you now click on save in a Javascript file, these actions will be executed.

Let the world know

Tobias Hofmann

Doing stuff with SAP since 1998. Open, web, UX, cloud. I am not a Basis guy, but very knowledgeable about Basis stuff, as it's the foundation of everything I do (DevOps). Performance is king, and unit tests is something I actually do. Developing HTML5 apps when HTML5 wasn't around. HCP/SCP user since 2012, NetWeaver since 2002, ABAP since 1998.

0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.