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

Case sensitivity related problem #1440

Open
savinmikhail opened this issue Oct 17, 2024 · 1 comment
Open

Case sensitivity related problem #1440

savinmikhail opened this issue Oct 17, 2024 · 1 comment

Comments

@savinmikhail
Copy link

savinmikhail commented Oct 17, 2024

Minimal reproducing repo: https://github.com/savinmikhail/deptrac-bug-reproducing-repo

Expected behavior:

So I expect deptrac to differentiate ./config from ./src/Config, but it doesn't happen, and it scolds that src layer depends on src layer AND that src depends on config layer, which both not proper behavior, I think

Possibly the part of the problem is that I use macOS, which is case-insensitive to directories

Mb I misconfigured deptrac

Received output:
image

my config:

deptrac:
    analyser:
        types:
            - class
            - class_superglobal
            - file
            - function
            - function_call
            - function_superglobal
            - use

    paths:
        - config
        - src

    layers:
        - { name: config,     collectors: [ { type: directory, value: ./config/.* } ] }
        - { name: src,        collectors: [ { type: directory, value: ./src/.* } ] }

    ruleset:
        config: [src]

for now I just excluded config rule from config

i will appreciate any help

@gennadigennadigennadi
Copy link
Member

The logic behind the directory collector ignores the case. You would have to change the regex of the collectors, so it does not match. Or you could use the classnameregexcollector.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants