Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(config-utl): makes possibly old format known violations forward …
…compatible (#890) ## Description, Motivation and Context - makes possibly old format known violations forward compatible directly after reading ... to prevent users from bumping into inexplicable errors. See the comment in extract-known-violations.mjs for details. ## How Has This Been Tested? - [x] green ci - [x] additional non-regression tests ## 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) - [ ] Breaking change (fix or feature that would cause existing functionality to change)
- Loading branch information
Showing
4 changed files
with
237 additions
and
3 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
47 changes: 47 additions & 0 deletions
47
test/config-utl/__mocks__/known-violations/known-violations-with-cycles-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,47 @@ | ||
[ | ||
{ | ||
"type": "cycle", | ||
"from": "tmp-errors/cycle-1.js", | ||
"to": "tmp-errors/cycle-2.js", | ||
"rule": { | ||
"severity": "error", | ||
"name": "no-circular" | ||
}, | ||
"cycle": [ | ||
{ | ||
"name": "tmp-errors/cycle-2.js", | ||
"dependencyTypes": ["local", "require"] | ||
}, | ||
{ | ||
"name": "tmp-errors/cycle-3.js", | ||
"dependencyTypes": ["local", "require"] | ||
}, | ||
{ | ||
"name": "tmp-errors/cycle-4.js", | ||
"dependencyTypes": ["local", "require"] | ||
}, | ||
{ | ||
"name": "tmp-errors/cycle-1.js", | ||
"dependencyTypes": ["local", "require"] | ||
} | ||
] | ||
}, | ||
{ | ||
"type": "module", | ||
"from": "tmp-errors/mod.mts", | ||
"to": "tmp-errors/mod.mts", | ||
"rule": { | ||
"severity": "error", | ||
"name": "no-orphans" | ||
} | ||
}, | ||
{ | ||
"type": "dependency", | ||
"from": "tmp-errors/call-mod.mts", | ||
"to": "./mod.mjs", | ||
"rule": { | ||
"severity": "error", | ||
"name": "not-to-unresolvable" | ||
} | ||
} | ||
] |
35 changes: 35 additions & 0 deletions
35
test/config-utl/__mocks__/known-violations/known-violations-with-cycles-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,35 @@ | ||
[ | ||
{ | ||
"type": "cycle", | ||
"from": "tmp-errors/cycle-1.js", | ||
"to": "tmp-errors/cycle-2.js", | ||
"rule": { | ||
"severity": "error", | ||
"name": "no-circular" | ||
}, | ||
"cycle": [ | ||
"tmp-errors/cycle-2.js", | ||
"tmp-errors/cycle-3.js", | ||
"tmp-errors/cycle-4.js", | ||
"tmp-errors/cycle-1.js" | ||
] | ||
}, | ||
{ | ||
"type": "module", | ||
"from": "tmp-errors/mod.mts", | ||
"to": "tmp-errors/mod.mts", | ||
"rule": { | ||
"severity": "error", | ||
"name": "no-orphans" | ||
} | ||
}, | ||
{ | ||
"type": "dependency", | ||
"from": "tmp-errors/call-mod.mts", | ||
"to": "./mod.mjs", | ||
"rule": { | ||
"severity": "error", | ||
"name": "not-to-unresolvable" | ||
} | ||
} | ||
] |
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