Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Linting should pick up duplicate segments in rules #228

@fahad19

Description

@fahad19

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions