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

Require spaces around parenthesis in top file #276

Open
clickthisnick opened this issue Nov 12, 2021 · 1 comment
Open

Require spaces around parenthesis in top file #276

clickthisnick opened this issue Nov 12, 2021 · 1 comment
Labels
Type: Enhancement New feature or request

Comments

@clickthisnick
Copy link

Is your feature request related to a problem? Please describe.

We have noticed that compound matching does not work in the top.sls file if you don't have spaces around the parenthesis

  'G@apple:yum and G@spinach:yum and (G@name:foo or G@name:bar or G@name:baz)':
    - foo.bar

The above did not work, whereas below with spaces ( and ) worked.

  'G@apple:yum and G@spinach:yum and ( G@name:foo or G@name:bar or G@name:baz )':
    - foo.bar

Describe the solution you'd like

It would be nice if salt-lint gave a warning to include spaces here

Describe alternatives you've considered

Haven't thought about anything else 😉

Additional context

None

@clickthisnick clickthisnick added the Type: Enhancement New feature or request label Nov 12, 2021
@roaldnefs
Copy link
Member

Thanks @clickthisnick for the feature request!

According to the SaltStack documentation the compound matchers indeed requires spaces between the parentheses and targets:

Be certain to note that spaces are required between the parentheses and targets. Failing to obey this rule may result in incorrect targeting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants