MarketSquare / MarketSquare/robotframework-style-guide

Consider how to create variables in user keywords eg. VAR, @{var}, &{var}

Open
#60 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

addressed-elsewhere
Dominant language
RobotFramework
Stars
29
Forks
5
PR merge metrics
No merged PRs in 30d

Description

When creating keywords there are currently quite a lot of different ways to create variables.

In a variable section, to create a variable, a list, or a dictionary we use the following:

```
${var} Variable
@{list} 1 2 3 4
&{dict} key=value solution=user
```

In user keywords there are now (with equals, because why not..

```
${dct}= Create Dictionary vs &{dct}= Create Dictionary
${lst}= Create List vs @{lst}= Create List
${var}= Set Variable
```
But we also have syntax VAR. and that changes things as well:

```
VAR @{lst}
VAR ${scalar}
VAR &{dict}
```

Some guideline with this might be good.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the variable-section, user-keyword, and VAR syntax examples in the issue and compare the conventions they illustrate. Define what the style guide should recommend for scalar, list, and dictionary variables, then document the agreed guidance and examples; no file or test location is identified in the issue.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.