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

Linting should pick up duplicate segments in rules #228

Open
fahad19 opened this issue Dec 11, 2023 · 0 comments
Open

Linting should pick up duplicate segments in rules #228

fahad19 opened this issue Dec 11, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@fahad19
Copy link
Member

fahad19 commented Dec 11, 2023

How to reproduce?

When defining segments as conditions in feature rules, do not allow same segments to be repeated.

For example, this should not be allowed:

// features/myFeature.yml

# ...

environments:
  production:
    - key: "1"
      segments: 
        - foo
        - bar
        - foo # linting should fail here
      percentage: 100

Where to update?

Linter code can be found here: https://github.com/featurevisor/featurevisor/tree/main/packages/core/src/linter

The same might be applicable for conditions as well inside Segments.

@fahad19 fahad19 added the enhancement New feature or request label Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant