fiuba08 / robotframework

Automatically exported from code.google.com/p/robotframework
Apache License 2.0
0 stars 0 forks source link

Tidy tool (and parsing modules) should preserve standalone comments in variable table #1210

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Before tidy:

*** Variables ***
# before
${fo} =     ba      # inline
# after

After:

*** Variables ***
${fo}             ba    # before    inline    after

Original issue reported on code.google.com by jussi.ao...@gmail.com on 28 Aug 2012 at 7:32

GoogleCodeExporter commented 9 years ago
The motivation for this issue came from the following NSN originated RIDE issue:
http://code.google.com/p/robotframework-ride/issues/detail?id=1049

I investigated this a little and preserving stand-alone comments in the 
variable table seems to be pretty simple. In the setting table that would be 
much harder. Because the setting table wasn't in the scope of the original RIDE 
issue, handling only the variable table ought to be enough also for this issue. 
In test case and keywords tables these comments are already handled correctly.

Original comment by pekka.klarck on 28 Aug 2012 at 10:04

GoogleCodeExporter commented 9 years ago
This issue was updated by revision 09358a36f574.

I changed parsing logic so that standalone comments (i.e. rows having only 
comments) are not added to the next (or previous) variable but kept standalone. 
In practice variable table nowadays can have variables that have no name and no 
value but only comments.

After this change standalone comments are still written back to disk in 
incorrectly. Fixing that will be part of the next commit.

Original comment by pekka.klarck on 29 Aug 2012 at 9:05

GoogleCodeExporter commented 9 years ago
This issue was updated by revision 978a6ed18f88.

Now standalone comments are also written correctly. New functionality is ready 
for testing with RIDE.

Original comment by pekka.klarck on 29 Aug 2012 at 11:32

GoogleCodeExporter commented 9 years ago
Tested that the changes worked fine also with RIDE. More work needed on RIDE 
side related to this still, but this issue can be closed.

Original comment by pekka.klarck on 29 Aug 2012 at 12:52