Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Extract method and trailing blank line

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
kimgr Posted - Mar 18 2009 : 06:07:49 AM
Hello,

When I use Extract Method the new method is usually added to the bottom of my current .cpp file. This is all well and good.

However, the almighty C++ standard requires that every translation unit ends with a blank line, and you don't add that after the last closing brace.

Granted, most, if not all, compilers accept translation units without a trailing line, but some tools such as PC-Lint highlight it as a problem.

Any chance you could throw in an extra CR/LF or LF, depending on the file's current default?

Thanks,
- Kim
2   L A T E S T    R E P L I E S    (Newest First)
kimgr Posted - Mar 18 2009 : 11:52:46 AM
Hi feline,

Thanks, I didn't know the refactorings were snippets, too.

That should definitely do it for me.

Cheers,
- Kim
feline Posted - Mar 18 2009 : 10:52:57 AM
We are considering a feature to make sure there is a blank line at the end of the file, when you are editing:

case=158

To fix Extract Method simply edit the VA Snippet "Refactor Extract Method" for C++ and add an extra blank line at the end of this snippet, which will then be inserted when you trigger Extract Method.

http://www.wholetomato.com/products/features/vasnippets.asp

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000