Since migrating from the previous vscode extension I've had the same issue described in: #361
With this test file:
*** Test Cases ***
Test
Embedded "args"
*** Keywords ***
Embedded "${args}"
No Operation
And this robot.toml:
[tool.robocop.format]
configure = [
"NormalizeNewLines.enabled=True",
]
When formatting the test file with the vscode extension multiple times. The file will cycle between the following states:
- No change after the first format
- An extra whitespace line is added before
*** Keywords ***
*** Test Cases ***
Test
Embedded "args"
*** Keywords ***
Embedded "${args}"
No Operation
- The file returns to original state
- FIle doesn't change
Repeat from 1
When formatting with robocop via the CLI this issue doesn't happen.
robocop format test.robot --config robot.toml
(Since it might be relevant, robocop also work as expected when disabling caching
robocop format test.robot --config robot.toml --no-cache)
It seems to have something to do with the NormalizeNewLines.section_lines and NormalizeNewLines.test_case_lines variables? When either of these variables is set to 0 this issue doesn't occur. However when both these variables are > 0 the formatting becomes inconsistent.
The RobotCode output doesn't seem to show anything:
executeRobotCode: c:\XXX\Python310\python.exe -u -X utf8 c:\XXX\.vscode\extensions\d-biehl.robotcode-2.5.1\bundled\tool\robotcode --format json --no-color --no-pager -dp . discover --read-from-stdin tests -I test.robot --suite Robottest.Test
executeRobotCode: exit code 0
RobotCode version: 2.5.1
robotframework-robocop version: 8.2.10
robotframework version: 6.1.1
OS: Windows 11
Since migrating from the previous vscode extension I've had the same issue described in: #361
With this test file:
And this robot.toml:
When formatting the test file with the vscode extension multiple times. The file will cycle between the following states:
*** Keywords ***Repeat from 1
When formatting with robocop via the CLI this issue doesn't happen.
robocop format test.robot --config robot.toml(Since it might be relevant, robocop also work as expected when disabling caching
robocop format test.robot --config robot.toml --no-cache)It seems to have something to do with the
NormalizeNewLines.section_linesandNormalizeNewLines.test_case_linesvariables? When either of these variables is set to0this issue doesn't occur. However when both these variables are> 0the formatting becomes inconsistent.The RobotCode output doesn't seem to show anything:
RobotCode version: 2.5.1
robotframework-robocop version: 8.2.10
robotframework version: 6.1.1
OS: Windows 11