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
docs(reference): describe restrictions of a variable name #4411
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great addition. I've only got some small notes.
docs/src/reference/variables.md
Outdated
* it must not start with a number | ||
* it must not contain whitespaces | ||
* it must not contain an operator (e.g. `+`, `-`, `*`, `/`, `=`, `>`, `?`, `.`) | ||
* it must not be a literal (`null`, `true`, `false`) or a keyword (e.g. `function`, `if`, `then`, `else`, `for`, `between`, `instance`, `of`, `not`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* it must not be a literal (`null`, `true`, `false`) or a keyword (e.g. `function`, `if`, `then`, `else`, `for`, `between`, `instance`, `of`, `not`) | |
* it must not be a literal (e.g. `null`, `true`, `false`) or a keyword (e.g. `function`, `if`, `then`, `else`, `for`, `between`, `instance`, `of`, `not`) |
docs/src/reference/variables.md
Outdated
* it must not start with a number | ||
* it must not contain whitespaces | ||
* it must not contain an operator (e.g. `+`, `-`, `*`, `/`, `=`, `>`, `?`, `.`) | ||
* it must not be a literal (`null`, `true`, `false`) or a keyword (e.g. `function`, `if`, `then`, `else`, `for`, `between`, `instance`, `of`, `not`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not entirely sure, but I'm wondering whether it may not contain x
is better for these restrictions.
docs/src/reference/variables.md
Outdated
@@ -2,6 +2,18 @@ | |||
|
|||
Variables are part of a workflow instance and represent the data of the instance. A variable has a name and a JSON value. The visibility of a variable is defined by its variable scope. | |||
|
|||
## Variable Names | |||
|
|||
The name of a variable can be any alphanumeric string including the `_` symbol. For a combination of words, it is recommended to use the `camelCase` or the `snake_case` format. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps we should additionally note here that kebab-case
cannot be used, because it might be a common pitfall.
f03b1ce
to
7563f21
Compare
@korthout , thank you for the fast review and the hints 👍 |
bors r+ |
4411: docs(reference): describe restrictions of a variable name r=saig0 a=saig0 ## Description * avoid that users use an invalid name for a variable by describing how a variable name should look like ## Related issues none # Co-authored-by: Philipp Ossler <philipp.ossler@gmail.com>
Build failed |
bors retry |
Build succeeded |
Description
Related issues
none
Pull Request Checklist
mvn clean install -DskipTests
locally before committing