Skip to content

Commit

Permalink
specify which path we're matching
Browse files Browse the repository at this point in the history
This wasn't clear to me, when I run `depcruise --validate .dependency-cruiser.json src`, exactly what I was trying to match in that regex. (relative to here? relative to src? relative to the file, as passed to `import` ?)

Thank you for making this tool and publishing and documenting it! This was really useful yesterday in identifying a circular dependency in TypeScript, which mocha totally barfs on.
  • Loading branch information
jessitron authored Mar 14, 2018
1 parent 9777c2e commit e9443af
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions doc/rules-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,8 @@ out dependency-cruiser will assume it to be `warn`.
A regular expression an end of a dependency should match to be catched by this
rule.

In `from`, this is the path from project root to the file containing a dependency. In `to`, this is the path from project root to the file the dependency resolves to.

When path is in a `to` part of a rule it accepts the regular expression
'group matching' special variables `$0`, `$1`, `$2`, ... as well. See
'group matching' below for an explanation & example.
Expand Down

0 comments on commit e9443af

Please sign in to comment.