Adjective-Object / good-fences-rs-core

9 stars 0 forks source link

IgnoredDirs should filter during directory walking, not during fence evaluation #25

Open Adjective-Object opened 1 year ago

Adjective-Object commented 1 year ago

See my comment here: https://github.com/Adjective-Object/good-fences-rs-core/pull/17#discussion_r997430670

This filtering should be done during the walk, not during the evaluation. Note that this will not produce identical behaviour, as regexes will be matched against directories, so regexes will effectively be matched against all ancestor paths of a path. This is only relevant for regex patterns that end with $.

However:

flickyiyo commented 1 year ago

This PR #26 addresses this but I still have some questions. If an ignored file is imported from a non-ignored, but that non-ignored doesn't isn't allowed to import that ignored file, is that still a violation? to my understanding it would depend on two things:

The first case should not mark a violation but the second does.

Is this the expected behavior?