-
Notifications
You must be signed in to change notification settings - Fork 256
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: makes entries in reachability via's contain more information (…
…BREAKING for API users) (#895) ## Description - Same as #888, but for the path detection algorithm underlying 'reaches' and 'reachable' rules The addition to the _rule_ will be in a separate PR ## Motivation and Context - fixing #763 - this PR is a prerequisite to implement the feature requested in there - feature parity with similar restrictions on cycles ## How Has This Been Tested? - [x] green ci - [x] updated automated regression tests - [x] dog-fooding on dependency-cruiser ## Types of changes - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] Documentation only change - [ ] Refactor (non-breaking change which fixes an issue without changing functionality) - [x] New feature (non-breaking change which adds functionality) - [x] Breaking change (fix or feature that would cause existing functionality to change) => for API only ## Checklist - [x] 📖 - My change doesn't require a documentation update, or ... - it _does_ and I have updated it - [x] ⚖️ - The contribution will be subject to [The MIT license](https://github.com/sverweij/dependency-cruiser/blob/main/LICENSE), and I'm OK with that. - The contribution is my own original work. - I am ok with the stuff in [**CONTRIBUTING.md**](https://github.com/sverweij/dependency-cruiser/blob/main/.github/CONTRIBUTING.md).
- Loading branch information
Showing
32 changed files
with
638 additions
and
167 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
30 changes: 30 additions & 0 deletions
30
test/config-utl/__mocks__/known-violations/known-violations-with-vias-in-new-format.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
[ | ||
{ | ||
"from": "src/foo/index.js", | ||
"to": "src/utl/quux.js", | ||
"rule": { | ||
"severity": "error", | ||
"name": "utl-not-reachable-from-extract" | ||
}, | ||
"via": [ | ||
{ "name": "src/foo/index.js", "dependencyTypes": [] }, | ||
{ "name": "src/foo/quuz.js", "dependencyTypes": [] }, | ||
{ "name": "src/utl/quux.js", "dependencyTypes": [] } | ||
], | ||
"cycle": [] | ||
}, | ||
{ | ||
"from": "src/foo/index.js", | ||
"to": "src/utl/grault.js", | ||
"rule": { | ||
"severity": "error", | ||
"name": "utl-not-reachable-from-extract" | ||
}, | ||
"via": [ | ||
{ "name": "src/foo/index.js", "dependencyTypes": [] }, | ||
{ "name": "src/foo/corge.js", "dependencyTypes": [] }, | ||
{ "name": "src/utl/grault.js", "dependencyTypes": [] } | ||
], | ||
"cycle": [] | ||
} | ||
] |
22 changes: 22 additions & 0 deletions
22
test/config-utl/__mocks__/known-violations/known-violations-with-vias-in-old-format.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
[ | ||
{ | ||
"from": "src/foo/index.js", | ||
"to": "src/utl/quux.js", | ||
"rule": { | ||
"severity": "error", | ||
"name": "utl-not-reachable-from-extract" | ||
}, | ||
"via": ["src/foo/index.js", "src/foo/quuz.js", "src/utl/quux.js"], | ||
"cycle": [] | ||
}, | ||
{ | ||
"from": "src/foo/index.js", | ||
"to": "src/utl/grault.js", | ||
"rule": { | ||
"severity": "error", | ||
"name": "utl-not-reachable-from-extract" | ||
}, | ||
"via": ["src/foo/index.js", "src/foo/corge.js", "src/utl/grault.js"], | ||
"cycle": [] | ||
} | ||
] |
Oops, something went wrong.