diff --git a/docs/releasenotes/5.9.0.rst b/docs/releasenotes/5.9.0.rst new file mode 100644 index 00000000..a32a4aa2 --- /dev/null +++ b/docs/releasenotes/5.9.0.rst @@ -0,0 +1,34 @@ +:orphan: + +============= +Robocop 5.8.0 +============= + +Update Robocop rules with GROUP support from Robot Framework 7.2. + +Following rules are updated & tested with GROUPs: + +- ``invalid-if`` +- ``missing-keyword-name`` +- ``parsing-error`` +- ``return-in-test-case`` +- ``too-many-calls-in-keyword`` +- ``too-many-calls-in-test-case`` +- ``possible-variable-overwriting`` +- ``bad-indent`` +- ``bad-block-indent`` + +Acknowledgements +================ + +Thanks to the whole community for submitting bug reports and feature requests. +Without you, Robocop wouldn't be in the place where it is now. All the feedback +is essential to drive the tool towards higher quality and better user +experience. + +If you want to help us more, consider contributing to the project directly. +We can offer our constant support to make the work fun and effective. We do +our best to create a supportive and welcoming environment for everyone. +Feel free to ping us on our official `#robocop-linter Slack channel`_ anytime. + +.. _#robocop-linter Slack channel: https://robotframework.slack.com/archives/C01AWSNKC2H \ No newline at end of file diff --git a/robocop/version.py b/robocop/version.py index e0b75277..b6a1a593 100644 --- a/robocop/version.py +++ b/robocop/version.py @@ -1 +1 @@ -__version__ = "5.8.0" +__version__ = "5.9.0" diff --git a/tests/atest/rules/errors/parsing_error/expected_output_rf7_2.txt b/tests/atest/rules/errors/parsing_error/expected_output_rf7_2.txt index 0a3127fa..049be0a5 100644 --- a/tests/atest/rules/errors/parsing_error/expected_output_rf7_2.txt +++ b/tests/atest/rules/errors/parsing_error/expected_output_rf7_2.txt @@ -35,4 +35,5 @@ invalid_try_except.robot:256:1 [E] 0401 Robot Framework syntax error: CONTINUE c invalid_try_except.robot:269:1 [E] 0401 Robot Framework syntax error: RETURN cannot be used in FINALLY branch. invalid_while.robot:10:1 [E] 0401 Robot Framework syntax error: WHILE accepts only one condition, got 3 conditions 'Too', 'many' and '!'. invalid_while.robot:16:1 [E] 0401 Robot Framework syntax error: WHILE loop cannot be empty. -invalid_while.robot:21:1 [E] 0401 Robot Framework syntax error: WHILE loop must have closing END. \ No newline at end of file +invalid_while.robot:21:1 [E] 0401 Robot Framework syntax error: WHILE loop must have closing END. +groups.robot:15:1 [E] 0401 Robot Framework syntax error: GROUP accepts only one argument as name, got 3 arguments 'Too', 'many' and 'values'. \ No newline at end of file diff --git a/tests/atest/rules/errors/parsing_error/groups.robot b/tests/atest/rules/errors/parsing_error/groups.robot new file mode 100644 index 00000000..1256dd5b --- /dev/null +++ b/tests/atest/rules/errors/parsing_error/groups.robot @@ -0,0 +1,38 @@ +*** Test Cases *** +END missing + [Documentation] FAIL GROUP must have closing END. + GROUP This is not closed + Fail Not run + +Empty + [Documentation] FAIL GROUP cannot be empty. + GROUP This is empty + END + Log Outside + +Multiple parameters + [Documentation] FAIL GROUP accepts only one argument as name, got 3 arguments 'Too', 'many' and 'values'. + GROUP Too many values + Fail Not run + END + Log Last Keyword + +Non-existing variable in name + [Documentation] FAIL Variable '\${non_existing_var}' not found. + GROUP ${non_existing_var} in name + Fail Not run + END + Log Last Keyword + +Invalid data is not reported after failures + [Documentation] FAIL Something bad happened! + # We probably should validate syntax before even executing the test and report + # such failures early. That should then be done also with other control structures. + Fail Something bad happened! + GROUP ${non_existing_non_executed_variable_is_ok} + Fail Not run + END + GROUP Empty non-executed GROUP is ok + END + GROUP Even missing END is ok + Fail Not run diff --git a/tests/atest/utils/__init__.py b/tests/atest/utils/__init__.py index e3cd0596..04321b4f 100644 --- a/tests/atest/utils/__init__.py +++ b/tests/atest/utils/__init__.py @@ -121,7 +121,7 @@ def check_rule( elif actual != expected: missing_expected = sorted(set(actual) - set(expected)) missing_actual = sorted(set(expected) - set(actual)) - error = "Actual issues are different than expected.\n" + error = f"Actual issues are different than expected.\nExpected file: {expected_file}\n" if missing_expected: present_in_actual = "\n ".join(missing_expected) error += f"Actual issues not found in expected:\n {present_in_actual}\n\n"