-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support for RF 7.2 GROUP syntax (#1157)
- Loading branch information
Showing
38 changed files
with
226 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = "5.7.0" | ||
__version__ = "5.8.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,3 +66,10 @@ RF 5 syntax | |
FINALLY | ||
Keyword | ||
END | ||
|
||
RF 7.2 Group | ||
GROUP | ||
IF | ||
Keyword | ||
END | ||
END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,3 +27,8 @@ Nested in blocks | |
FINALLY | ||
${var} | ||
END | ||
|
||
Group | ||
GROUP Missing keyword name | ||
${var} | ||
END |
File renamed without changes.
38 changes: 38 additions & 0 deletions
38
tests/atest/rules/errors/parsing_error/expected_output_rf7_2.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
variable_errors.robot:5:1 [E] 0401 Robot Framework syntax error: Invalid variable name 'value'. | ||
variable_errors.robot:7:1 [E] 0401 Robot Framework syntax error: Invalid dictionary variable item '1'. Items must use 'name=value' syntax or be dictionary variables themselves. | ||
positional_args.robot:3:32 [E] 0401 Robot Framework syntax error: Positional argument '${arg2}' follows named argument | ||
positional_args.robot:3:43 [E] 0401 Robot Framework syntax error: Positional argument '${arg3}' follows named argument | ||
positional_args.robot:8:32 [E] 0401 Robot Framework syntax error: Positional argument '${arg2}' follows named argument | ||
positional_args.robot:8:57 [E] 0401 Robot Framework syntax error: Positional argument '${arg1}' follows named argument | ||
positional_args.robot:12:29 [E] 0401 Robot Framework syntax error: Positional argument '@{args}' follows named argument | ||
positional_args.robot:12:38 [E] 0401 Robot Framework syntax error: Positional argument '${arg}' follows named argument | ||
invalid_try_except.robot:4:1 [E] 0401 Robot Framework syntax error: TRY must have closing END. | ||
invalid_try_except.robot:13:1 [E] 0401 Robot Framework syntax error: TRY branch cannot be empty. | ||
invalid_try_except.robot:22:1 [E] 0401 Robot Framework syntax error: TRY structure must have EXCEPT or FINALLY branch. | ||
invalid_try_except.robot:28:1 [E] 0401 Robot Framework syntax error: TRY structure must have EXCEPT or FINALLY branch. | ||
invalid_try_except.robot:36:1 [E] 0401 Robot Framework syntax error: TRY does not accept arguments, got 'I should not be here'. | ||
invalid_try_except.robot:48:1 [E] 0401 Robot Framework syntax error: EXCEPT branch cannot be empty. | ||
invalid_try_except.robot:57:1 [E] 0401 Robot Framework syntax error: EXCEPT without patterns must be last. | ||
invalid_try_except.robot:69:1 [E] 0401 Robot Framework syntax error: Only one EXCEPT without patterns allowed. | ||
invalid_try_except.robot:83:1 [E] 0401 Robot Framework syntax error: EXCEPT AS requires a value. | ||
invalid_try_except.robot:91:1 [E] 0401 Robot Framework syntax error: EXCEPT AS accepts only one value. | ||
invalid_try_except.robot:99:1 [E] 0401 Robot Framework syntax error: EXCEPT AS variable 'foo' is invalid. | ||
invalid_try_except.robot:109:1 [E] 0401 Robot Framework syntax error: ELSE does not accept arguments, got 'I should not be here'. | ||
invalid_try_except.robot:121:1 [E] 0401 Robot Framework syntax error: ELSE branch cannot be empty. | ||
invalid_try_except.robot:128:1 [E] 0401 Robot Framework syntax error: Only one ELSE allowed. | ||
invalid_try_except.robot:146:1 [E] 0401 Robot Framework syntax error: FINALLY does not accept arguments, got 'ooops', 'i', 'did', 'it' and 'again'. | ||
invalid_try_except.robot:154:1 [E] 0401 Robot Framework syntax error: FINALLY branch cannot be empty. | ||
invalid_try_except.robot:159:1 [E] 0401 Robot Framework syntax error: Only one FINALLY allowed. | ||
invalid_try_except.robot:171:1 [E] 0401 Robot Framework syntax error: EXCEPT not allowed after ELSE. | ||
invalid_try_except.robot:185:1 [E] 0401 Robot Framework syntax error: EXCEPT not allowed after FINALLY. | ||
invalid_try_except.robot:197:1 [E] 0401 Robot Framework syntax error: ELSE not allowed after FINALLY. | ||
invalid_try_except.robot:210:1 [E] 0401 Robot Framework syntax error: TRY does not support templates. | ||
invalid_try_except.robot:220:1 [E] 0401 Robot Framework syntax error: TRY does not support templates. | ||
invalid_try_except.robot:233:1 [E] 0401 Robot Framework syntax error: TRY does not support templates. | ||
invalid_try_except.robot:233:1 [E] 0401 Robot Framework syntax error: TRY must have closing END. | ||
invalid_try_except.robot:246:1 [E] 0401 Robot Framework syntax error: BREAK cannot be used in FINALLY branch. | ||
invalid_try_except.robot:256:1 [E] 0401 Robot Framework syntax error: CONTINUE cannot be used in FINALLY branch. | ||
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,9 @@ RETURN | |
EXCEPT | ||
RETURN | ||
END | ||
GROUP | ||
RETURN | ||
END | ||
[Return] | ||
|
||
*** Keywords *** | ||
|
1 change: 1 addition & 0 deletions
1
tests/atest/rules/lengths/too_many_calls_in_keyword/expected_output_groups.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
groups.robot:15:1 [W] 0503 Keyword 'Some Keyword' has too many keywords inside (11/10) |
31 changes: 31 additions & 0 deletions
31
tests/atest/rules/lengths/too_many_calls_in_keyword/groups.robot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
*** Settings *** | ||
Documentation doc | ||
|
||
*** Test Cases *** | ||
Test | ||
[Documentation] doc | ||
[Tags] sometag | ||
Pass | ||
Keyword | ||
One More | ||
|
||
|
||
*** Keywords *** | ||
Some Keyword | ||
[Documentation] this is doc | ||
No Operation | ||
Pass | ||
No Operation | ||
Fail | ||
No Operation | ||
VAR ${variable} value | ||
No Operation | ||
GROUP | ||
No Operation | ||
END | ||
No Operation | ||
FOR ${var} IN RANGE 10 | ||
No Operation | ||
No Operation | ||
END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
*** Keywords *** | ||
Used in GROUP name | ||
[Arguments] ${argument} | ||
GROUP Name with ${argument} | ||
No Operation | ||
END | ||
|
||
Used In GROUP body | ||
[Arguments] ${argument} | ||
GROUP Named | ||
Log ${argument} | ||
END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
tests/atest/rules/misc/unused_variable/expected_output_groups.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
groups.robot:16:9 [I] 0920 Variable '${variable}' is assigned but not used |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
*** Test Cases *** | ||
Used in GROUP name | ||
${variable} Keyword Call | ||
GROUP Name with ${variable} | ||
No Operation | ||
END | ||
|
||
Used in GROUP body | ||
${variable} Keyword Call | ||
GROUP Named | ||
Log ${variable} | ||
END | ||
|
||
Unused defined in GROUP | ||
GROUP Named | ||
${variable} Keyword Call | ||
${used} Keyword Call | ||
END | ||
Log ${used} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
tests/atest/rules/naming/possible_variable_overwriting/expected_groups.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
groups.robot:5:16 [I] 0316 Variable '${variableName}' may overwrite similar variable inside 'VAR Syntax' TestCase. Note that variables are case-insensitive, and also spaces and underscores are ignored. | ||
groups.robot:7:20 [I] 0316 Variable '${variable name}' may overwrite similar variable inside 'VAR Syntax' TestCase. Note that variables are case-insensitive, and also spaces and underscores are ignored. |
9 changes: 9 additions & 0 deletions
9
tests/atest/rules/naming/possible_variable_overwriting/groups.robot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
*** Test Cases *** | ||
VAR Syntax | ||
${variable_name} = Set Variable value | ||
GROUP | ||
VAR ${variableName} value | ||
GROUP | ||
VAR ${variable name} value | ||
END | ||
END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
tests/atest/rules/spacing/bad_block_indent/expected_groups.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
groups.robot:4:1 [E] 1017 Indent expected. Provide 2 or more spaces of indentation for statements inside block | ||
groups.robot:10:1 [E] 1017 Indent expected. Provide 2 or more spaces of indentation for statements inside block | ||
groups.robot:12:1 [E] 1017 Indent expected. Provide 2 or more spaces of indentation for statements inside block |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
*** Test Cases *** | ||
Test with groups | ||
GROUP | ||
Log Not enough indent | ||
END | ||
GROUP | ||
Log Enough indent | ||
END | ||
GROUP Nested | ||
GROUP | ||
Single | ||
END | ||
END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
tests/atest/rules/spacing/bad_indent/groups/expected_groups.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
groups${/}groups.robot:5:1 [W] 1008 Line is over-indented | ||
groups${/}groups.robot:9:1 [W] 1008 Line is over-indented | ||
groups${/}groups.robot:15:1 [W] 1008 Line is under-indented | ||
groups${/}groups.robot:17:1 [W] 1008 Line is over-indented |
Oops, something went wrong.