Describe the bug
When using a pyproject.toml file with fix=true in the [tool.robocop.lint] section along with the "inconsistent-assignment-in-variables.assignment_sign_type setting, variables are formatted wrong.
Steps To Reproduce
Steps to reproduce the behavior:
- Install latest robotcode & robocop 9+ in VSCode.
- Create a keybinding for "format file" and disable format on save. (possibly optional)
- Create a new project and add one .robot file and one pyproject.toml file to the root.
- Set to toml:
[tool.robocop.lint]
configure = [
"inconsistent-assignment-in-variables.assignment_sign_type=equal_sign",
"inconsistent-assignment.assignment_sign_type=equal_sign"
]
- Create a simple robot file where there are variables without the equal sign:
*** Settings ***
Documentation Robocop test
*** Variables ***
${one} 1
${two} 2
*** Test Cases ***
Test Test Case
Log something
VAR ${variable} I am a variable
- Add
fix=true to the beginning of the [tool.robocop.lint] section in the .toml file.
- Save & apply formatting to the .robot file
Note that sometimes you need to apply the formatting multiple times or re-open the file to get the behavior.
Expected behavior
Output is a .robot file formatted according to robocop rules.
Actual output
Output is a .robot file with incorrect amount of equal signs.
*** Settings ***
Documentation Robocop test
*** Variables ***
${one}= == 1
${two}= == 2
*** Test Cases ***
Test Test Case
Log something
VAR ${variable}= == I am a variable
Another example:
Note that running robocop format .\test.robot with the same .toml does not seem to cause the issue.
Specs:
- VS Code Version: 1.139.1 (user setup)
- RobotCode Version 2.7.0
- OS: Windows 11 64 bit
- Python Version 3.14.4
- RobotFramework Version 7.4.2
- Robocop: 9.1.0
Describe the bug
When using a pyproject.toml file with fix=true in the [tool.robocop.lint] section along with the "inconsistent-assignment-in-variables.assignment_sign_type setting, variables are formatted wrong.
Steps To Reproduce
Steps to reproduce the behavior:
fix=trueto the beginning of the[tool.robocop.lint]section in the .toml file.Note that sometimes you need to apply the formatting multiple times or re-open the file to get the behavior.
Expected behavior
Output is a .robot file formatted according to robocop rules.
Actual output
Output is a .robot file with incorrect amount of equal signs.
Another example:
Note that running
robocop format .\test.robotwith the same .toml does not seem to cause the issue.Specs: