-
Notifications
You must be signed in to change notification settings - Fork 269
Open
Labels
enhancementthis will make dependency-cruiser sweeterthis will make dependency-cruiser sweeter
Description
Expected Behavior
If I write a reachability rule, and the paths defined in from
or to
don't resolve to actual files on disk, I've written an incorrect rule. It would be best if depcruise failed in this case so that the developer can catch and fix the rule. It also helps ensure that dependency tests continue to stay in sync as files are moved around.
Current Behavior
depcruise silently succeeds.
Possible Solution
Make depcruise fail if from
or to
are never matched by a file on disk.
Steps to Reproduce (for bugs)
I'm using 16.9.0-beta-1 and able to reproduce this with a simple rule of the form of
{
from: {
path: "path/that/doesnt/exist.ts",
},
to: {
path: "path/that/exists.ts",
reachable: true,
},
},
Context
I'm writing rules in depcruise, putting them in my CI, and I want them to continue to stay correct over time.
Your Environment
- Version used: 16.9.0-beta-1
- Node version: 20
- Operating System and version: Ubuntu 22
Metadata
Metadata
Assignees
Labels
enhancementthis will make dependency-cruiser sweeterthis will make dependency-cruiser sweeter