Skip to content
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: Add MD for var-naming #2594

Merged
merged 2 commits into from
Oct 11, 2022
Merged

Conversation

oraNod
Copy link
Collaborator

@oraNod oraNod commented Oct 11, 2022

This PR adds docu for the var-naming rule.

@oraNod oraNod requested a review from a team as a code owner October 11, 2022 12:01
@ssbarnea ssbarnea added the bug label Oct 11, 2022
@oraNod oraNod force-pushed the rule-docs-var-naming branch 2 times, most recently from 94deb56 to aed297f Compare October 11, 2022 19:22
this_is_valid: # <- This is a dict, not a variable
ALL_CAPS: bar # <- Contains only uppercase characters.
v@r!able: baz # <- Contains special characters.
```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is not correct because variables are only the keys at the first level under vars. They can have any kind of value and if they are dictionaries the keys of these dictionaries are not forced to follow the same rules. Basically only the CameCase example is correct.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about now? I just remove the dictionary to avoid confusion.

Copy link
Member

@ssbarnea ssbarnea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see comment

@ssbarnea ssbarnea merged commit 3a9e290 into ansible:main Oct 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants