-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix issue with .git suffix Adds tests of non-crates.io registries * Update * Fix trailing slash * Warn and strip when using scheme modifiers
- Loading branch information
1 parent
d485903
commit 568c350
Showing
18 changed files
with
414 additions
and
35 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
21 changes: 21 additions & 0 deletions
21
src/sources/snapshots/cargo_deny__sources__cfg__test__deserializes_sources_cfg.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,21 @@ | ||
--- | ||
source: src/sources/cfg.rs | ||
expression: diags | ||
--- | ||
[ | ||
{ | ||
"fields": { | ||
"labels": [ | ||
{ | ||
"column": 5, | ||
"line": 7, | ||
"message": "", | ||
"span": "sparse+http" | ||
} | ||
], | ||
"message": "scheme modifiers are unnecessary", | ||
"severity": "warning" | ||
}, | ||
"type": "diagnostic" | ||
} | ||
] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
--- | ||
source: tests/sources.rs | ||
expression: diags | ||
--- | ||
[ | ||
{ | ||
"fields": { | ||
"code": "allowed-source", | ||
"graphs": [ | ||
{ | ||
"Krate": { | ||
"name": "crate-one", | ||
"version": "0.1.0" | ||
}, | ||
"parents": [ | ||
{ | ||
"Krate": { | ||
"name": "non-crates-io-registry", | ||
"version": "0.1.0" | ||
} | ||
} | ||
] | ||
} | ||
], | ||
"labels": [ | ||
{ | ||
"column": 17, | ||
"line": 1, | ||
"message": "source", | ||
"span": "registry+https://dl.cloudsmith.io/public/embark/deny/cargo/index.git" | ||
}, | ||
{ | ||
"column": 9, | ||
"line": 3, | ||
"message": "source allowance", | ||
"span": "'https://dl.cloudsmith.io/public/embark/deny/cargo/index.git'" | ||
} | ||
], | ||
"message": "'registry' source explicitly allowed", | ||
"severity": "note" | ||
}, | ||
"type": "diagnostic" | ||
}, | ||
{ | ||
"fields": { | ||
"code": "source-not-allowed", | ||
"graphs": [ | ||
{ | ||
"Krate": { | ||
"name": "crate-two", | ||
"version": "0.2.0" | ||
}, | ||
"parents": [ | ||
{ | ||
"Krate": { | ||
"name": "non-crates-io-registry", | ||
"version": "0.1.0" | ||
} | ||
} | ||
] | ||
} | ||
], | ||
"labels": [ | ||
{ | ||
"column": 17, | ||
"line": 2, | ||
"message": "source", | ||
"span": "sparse+https://cargo.cloudsmith.io/embark/deny/" | ||
} | ||
], | ||
"message": "detected 'registry' source not explicitly allowed", | ||
"severity": "error" | ||
}, | ||
"type": "diagnostic" | ||
} | ||
] |
76 changes: 76 additions & 0 deletions
76
tests/snapshots/sources__allows_registry_index_sparse.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,76 @@ | ||
--- | ||
source: tests/sources.rs | ||
expression: diags | ||
--- | ||
[ | ||
{ | ||
"fields": { | ||
"code": "source-not-allowed", | ||
"graphs": [ | ||
{ | ||
"Krate": { | ||
"name": "crate-one", | ||
"version": "0.1.0" | ||
}, | ||
"parents": [ | ||
{ | ||
"Krate": { | ||
"name": "non-crates-io-registry", | ||
"version": "0.1.0" | ||
} | ||
} | ||
] | ||
} | ||
], | ||
"labels": [ | ||
{ | ||
"column": 17, | ||
"line": 1, | ||
"message": "source", | ||
"span": "registry+https://dl.cloudsmith.io/public/embark/deny/cargo/index.git" | ||
} | ||
], | ||
"message": "detected 'registry' source not explicitly allowed", | ||
"severity": "error" | ||
}, | ||
"type": "diagnostic" | ||
}, | ||
{ | ||
"fields": { | ||
"code": "allowed-source", | ||
"graphs": [ | ||
{ | ||
"Krate": { | ||
"name": "crate-two", | ||
"version": "0.2.0" | ||
}, | ||
"parents": [ | ||
{ | ||
"Krate": { | ||
"name": "non-crates-io-registry", | ||
"version": "0.1.0" | ||
} | ||
} | ||
] | ||
} | ||
], | ||
"labels": [ | ||
{ | ||
"column": 17, | ||
"line": 2, | ||
"message": "source", | ||
"span": "sparse+https://cargo.cloudsmith.io/embark/deny/" | ||
}, | ||
{ | ||
"column": 9, | ||
"line": 3, | ||
"message": "source allowance", | ||
"span": "'https://cargo.cloudsmith.io/embark/deny/'" | ||
} | ||
], | ||
"message": "'registry' source explicitly allowed", | ||
"severity": "note" | ||
}, | ||
"type": "diagnostic" | ||
} | ||
] |
Oops, something went wrong.