Menu

#455 Feature Request: Remove Trailing Whitespace

closed-fixed
None
2019-01-30
2017-08-19
Ken Paulson
No

It would be great to have an option to remove trailing whitespace in a file.

Discussion

  • Jim Pattee

    Jim Pattee - 2017-10-01

    It should do this now.
    Send an example of trailing whitespace not being removed.

     
  • Jim Pattee

    Jim Pattee - 2018-01-03
    • status: open --> open-fixed
    • assigned_to: Jim Pattee
     
  • Jim Pattee

    Jim Pattee - 2018-01-25
    • status: open-fixed --> closed-fixed
     
  • RichB

    RichB - 2019-01-22

    Hello, is there an option to -not- remove trailing whitespace? Or is there an older version that doesn't remove trailing whitespace? I looked through the documentation and couldn't find an option that looked like it work for me. Thanks, Rich.

     
  • Jim Pattee

    Jim Pattee - 2019-01-22

    Trailing whitespace is always removed.
    You could probably patch the program to not remove it.

     
  • RichB

    RichB - 2019-01-22

    Hello Jim,
    Thanks for the quick response. This is one of the things where one persons bug is another persons feature. I've been using Codeblocks with the Astyle plugin, and it's been a great tool. I'm on a new team, and I'd like to be able to turn on or turn off removal of trailing whitespace. Would you mind pointing me to the section in the program that I should start looking at?
    Thanks again, Rich.

     
  • Jim Pattee

    Jim Pattee - 2019-01-24

    In ASBeautifier function trim(const string& str).

     
  • RichB

    RichB - 2019-01-30

    Hello Jim,

    By adding some print statements, showing the 'formattedLine' and 'ReadyFormattedLine', the trailing whitespace is removed in ASFormatter::nextLine() inside of the 'while (!isLineReady)'. The trailing whitespace has already been removed before the call to 'trim(readyFormattedLine).length()'. I haven't tracked down the exact location inside the really long 'while' statement.
    Thanks, Rich.

     

Log in to post a comment.

MongoDB Logo MongoDB