forked from mozilla/cargo-vet
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is a fairly straightforward implementation of imports.exclude. The configuration option is already documented in the book. After changing this configuration value, you'll need to update imports.lock by running a successful `cargo vet` without `--locked` (or by running `cargo vet regenerate imports`). I also added some validation to help catch outdated `imports.lock` files when running with `--locked`. These will never fire when unlocked, as `imports.lock` will be automatically updated in those cases. Fixes mozilla#80
- Loading branch information
Showing
11 changed files
with
318 additions
and
25 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
17 changes: 17 additions & 0 deletions
17
src/tests/snapshots/cargo_vet__tests__import__peer_audits_import_exclusion.snap
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,17 @@ | ||
--- | ||
source: src/tests/import.rs | ||
expression: output | ||
--- | ||
|
||
-[[audits.peer-company.audits.third-party1]] | ||
-criteria = "safe-to-deploy" | ||
-violation = "*" | ||
- | ||
-[[audits.peer-company.audits.third-party2]] | ||
-criteria = "safe-to-deploy" | ||
-version = "10.0.0" | ||
- | ||
[[audits.peer-company.audits.transitive-third-party1]] | ||
criteria = "safe-to-deploy" | ||
version = "10.0.0" | ||
|
11 changes: 11 additions & 0 deletions
11
...ests/snapshots/cargo_vet__tests__store_parsing__outdated_imports_lock_excluded_crate.snap
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,11 @@ | ||
--- | ||
source: src/tests/store_parsing.rs | ||
expression: acquire_errors | ||
--- | ||
|
||
× Your cargo-vet store (supply-chain) has consistency errors | ||
|
||
Error: | ||
× imports.lock is out-of-date with respect to configuration | ||
help: run `cargo vet` without --locked to update imports | ||
|
11 changes: 11 additions & 0 deletions
11
src/tests/snapshots/cargo_vet__tests__store_parsing__outdated_imports_lock_extra_peer.snap
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,11 @@ | ||
--- | ||
source: src/tests/store_parsing.rs | ||
expression: acquire_errors | ||
--- | ||
|
||
× Your cargo-vet store (supply-chain) has consistency errors | ||
|
||
Error: | ||
× imports.lock is out-of-date with respect to configuration | ||
help: run `cargo vet` without --locked to update imports | ||
|
11 changes: 11 additions & 0 deletions
11
src/tests/snapshots/cargo_vet__tests__store_parsing__outdated_imports_lock_missing_peer.snap
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,11 @@ | ||
--- | ||
source: src/tests/store_parsing.rs | ||
expression: acquire_errors | ||
--- | ||
|
||
× Your cargo-vet store (supply-chain) has consistency errors | ||
|
||
Error: | ||
× imports.lock is out-of-date with respect to configuration | ||
help: run `cargo vet` without --locked to update imports | ||
|
5 changes: 5 additions & 0 deletions
5
src/tests/snapshots/cargo_vet__tests__store_parsing__outdated_imports_lock_ok.snap
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,5 @@ | ||
--- | ||
source: src/tests/store_parsing.rs | ||
expression: acquire_errors | ||
--- | ||
|
Oops, something went wrong.