Xcode doesn't trim trailing whitespace in comments
| Originator: | keithbsmiley | ||
| Number: | rdar://24029513 | Date Originated: | 31-Dec-2015 12:25 PM |
| Status: | Duplicate of 23368790 (open) | Resolved: | |
| Product: | Developer Tools | Product Version: | 7.2 |
| Classification: | Other Bug | Reproducible: | Always |
Summary: When "Automatically trim trailing whitespace" and "Including whitespace-only lines" are enabled in Xcode's "Text Editing" preferences, blank lines in multiline comments are not trimmed. Steps to reproduce: 1. Enabled the 2 mentioned settings, from the command line if you'd like: ``` defaults write com.apple.dt.Xcode DVTTextEditorTrimTrailingWhitespace -bool true defaults write com.apple.dt.Xcode DVTTextEditorTrimWhitespaceOnlyLines -bool true ``` 2. Add a blankline with trailing whitespace in a multiline comment (open the attached file for an example) 3. Save the file Expected results: Xcode trims the blank line in the comment Actual results: Xcode doesn't touch the lines inside comments, leaving it with trailing whitespace.
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!