robotframework / robotframework/RIDE

Variable file rejected if it contains variables with a hyphen or space in the name

Open
#1,945 14 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement prio-low
Dominant language
Python
Stars
1k
Forks
385
Avg merge
13m
Merged PRs (30d)
2

Description

This is my second attempt to use variable files, as I struggled to figure out why Ride would not accept my file. After some experimentation, it seems Ride does not like variables within a variable file to have hyphens (or spaces) in the name. This is confusing as it allows hyphens and spaces in variable names that are created elsewhere.
E.g. this code in a resources file works:-

 *** Variables ***
 ${ID-Prefix}

Also the documentation in RF (https://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#variables) does not specifically warn against using hyphens (using only alphabetic characters from a to z, numbers, underscore and space is recommended...).

I am not sure if this is a RF or just a Ride issue, but I am hoping it can either be fixed, or the documentation updated to reflect the limitation.

Many thanks

Contributor guide

Open the contributing guide

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

Start by reproducing the reported variable-file failure with names containing hyphens or spaces, then compare it with the working resources-file example. Trace whether parsing belongs to RIDE or Robot Framework; done means either variable files accept these names consistently or the limitation is clearly documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.