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

Refactor configuration file diagram filters config #289

Open
bkryza opened this issue Jun 12, 2024 · 0 comments
Open

Refactor configuration file diagram filters config #289

bkryza opened this issue Jun 12, 2024 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@bkryza
Copy link
Owner

bkryza commented Jun 12, 2024

Currently, the logical structure of the include and exclude filters is fixed, i.e. some of the filters act as or/anyof while others act as and/allof.

The configuration file syntax should allow users to define their own logic, e.g.:

  # Include an item in the diagram if it matches any of the following filters
  include:
    - anyof:
        # Any element in ns1::ns2 and its subnamespaces
        - namespaces:
            - ns1::ns2
        # Specifically include class std::thread
        - elements:
            - std::thread
        # And also any item that matches all constraints below, i.e.:
        - allof:
            # Any element that is in a direct relation to ns1::ns3::ClassA
            - context:
               - ns1::ns3::ClassA
            # but only if it belongs to ns1::ns3
            - namespaces:
               - ns1::ns3

In order to maintain backward compatiblity, this should be enabled (opt-in) in diagram configuration using some new option, e.g.:

  filter_config_version: 2
@bkryza bkryza added the enhancement New feature or request label Jun 12, 2024
@bkryza bkryza added this to the 0.5.4 milestone Jun 12, 2024
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