Author |
Topic |
|
kimgr
New Member
Sweden
2 Posts |
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 |
|
feline
Whole Tomato Software
United Kingdom
19022 Posts |
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 |
zen is the art of being at one with the two'ness |
|
|
kimgr
New Member
Sweden
2 Posts |
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 |
|
|
|
Topic |
|
|
|