Skip to content

[Rule] GROUP rules #1159

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
bhirsz opened this issue Jan 2, 2025 · 6 comments
Open

[Rule] GROUP rules #1159

bhirsz opened this issue Jan 2, 2025 · 6 comments
Labels
rule Issue related to creating or changing a rule

Comments

@bhirsz
Copy link
Member

bhirsz commented Jan 2, 2025

Robot Framework 7.2 introduce new syntax: GROUP. We need to add rules that will cover it.

Proposals:

  1. GROUP without name
GROUP
    Keyword Call
END
  1. Nested GROUPs
GROUP    Named
    GROUP  At some point we may recommend not using nested groups / use custom keywords instead
        Keyword Call
    END
END
  1. Too many parameters - already handled by parsing error
    GROUP    Too    many    values
        Fail    Not run
    END
  1. Empty group
GROUP    Empty group
END
  1. Invalid syntax (for some reason parsing error does not catch it):
GROUP    Group without end
```
@bhirsz bhirsz added the rule Issue related to creating or changing a rule label Jan 2, 2025
@bhirsz
Copy link
Member Author

bhirsz commented Jan 2, 2025

Also #1158

@Lakitna
Copy link
Contributor

Lakitna commented Jan 7, 2025

How about GROUP with a single keyword in the body?

GROUP  foo
    Do only one thing
END

@Lakitna
Copy link
Contributor

Lakitna commented Jan 7, 2025

And maybe a rule for too deeply nested stuff. You can do this without groups, but groups make it easier to create deep nesting:

GROUP  foo
  IF  something
    FOR  i  IN  range(10)
      GROUP  bar
        ...
      END
    END
  END
END

@bhirsz
Copy link
Member Author

bhirsz commented Jan 7, 2025

How about GROUP with a single keyword in the body?

GROUP  foo
    Do only one thing
END

yes, typically we should avoid it - we can add len rule for it (configurable if needed). Also too big group rule

@jannek76
Copy link
Contributor

jannek76 commented Apr 7, 2025

any ideas to get this published?

@bhirsz
Copy link
Member Author

bhirsz commented Apr 7, 2025

It should be implemented first :) currently I'm handling ongoing issues after 6.0 release, but if not someone else, then I could take a look ina upcoming weeks. If you have ideas for different group rules then also please share.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rule Issue related to creating or changing a rule
Projects
None yet
Development

No branches or pull requests

3 participants