Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use nicer utf8 characters for diagnostics #675

Merged
merged 5 commits into from
Jul 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,28 @@ warning[deprecated]: this key will be removed in a future update, see https://gi
┌─ tests/cfg/advisories.toml:4:1
4 │ vulnerability = "deny"
^^^^^^^^^^^^^
━━━━━━━━━━━━━

warning[deprecated]: this key will be removed in a future update, see /~https://github.com/EmbarkStudios/cargo-deny/pull/611 for details
┌─ tests/cfg/advisories.toml:5:1
5 │ unmaintained = "warn"
^^^^^^^^^^^^
━━━━━━━━━━━━

warning[deprecated]: this key will be removed in a future update, see /~https://github.com/EmbarkStudios/cargo-deny/pull/611 for details
┌─ tests/cfg/advisories.toml:6:1
6 │ unsound = "warn"
^^^^^^^
━━━━━━━

warning[deprecated]: this key will be removed in a future update, see /~https://github.com/EmbarkStudios/cargo-deny/pull/611 for details
┌─ tests/cfg/advisories.toml:8:1
8 │ notice = "warn"
^^^^^^
━━━━━━

warning[deprecated]: this key will be removed in a future update, see /~https://github.com/EmbarkStudios/cargo-deny/pull/611 for details
┌─ tests/cfg/advisories.toml:14:1
14 │ severity-threshold = "medium"
^^^^^^^^^^^^^^^^^^
━━━━━━━━━━━━━━━━━━
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ error: unable to obtain $HOME: HOME directory could not be obtained from the OS
┌─ expansions.toml:3:6
3 │ "~/nope", # can't find $HOME
^


error: unable to obtain $HOME: non-utf8 path: PathBuf contains invalid UTF-8: �berraschung: Path contains invalid UTF-8
┌─ expansions.toml:4:6
4 │ "~/not-utf8", # $HOME is not a utf-8 path
^


/this-home/works
Expand All @@ -23,29 +23,29 @@ error: opening `{` is unbalanced
┌─ expansions.toml:8:6
8 │ "${no-end", # fails due to unclosed {
^^^^^^^^
━━━━━━━━


/missing/but i have a default/
error: failed to expand variable: '"\xDCberraschung"' is not utf-8
┌─ expansions.toml:10:16
10 │ "/non-utf8/$NON_UTF8", # fails due to NON_UTF8
^^^^^^^^^
━━━━━━━━━


error: variable name cannot be empty
┌─ expansions.toml:11:6
11 │ "$/empty", # fails due to empty variable
^


error: variable name cannot be empty
┌─ expansions.toml:12:18
12 │ "/also-empty/${}", # ditto
^^^
━━━


/has-trailing/trail
Expand All @@ -54,14 +54,14 @@ error: variable name cannot be empty
┌─ expansions.toml:15:6
15 │ "$!", # fails due to empty variable name
^


error: variable name is invalid
┌─ expansions.toml:16:6
16 │ "${!}", # fails due to invalid character in variable name
^^^^
━━━━


/expands/stuff-in-the-middle-like-this
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,24 @@ warning: duplicate items detected
┌─ duplicates:9:6
9 │ "RUSTSEC-0000-0001",
-----------------
─────────────────
10 │ { crate = "boop" },
11 │ "RUSTSEC-0000-0001",
-----------------
─────────────────

warning: duplicate items detected
┌─ duplicates:10:5
10 │ { crate = "boop" },
------------------
──────────────────
11 │ "RUSTSEC-0000-0001",
12 │ "boop",
----
────

warning: duplicate items detected
┌─ duplicates:5:6
5 │ "https://one.reg",
---------------
───────────────
6 │ "https://one.reg",
│ ---------------


│ ───────────────
2 changes: 1 addition & 1 deletion src/cargo-deny/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@ impl<'a> DiagPrinter<'a> {
which: OutputFormat::Human(Human {
stream,
grapher: krates.map(diag::InclusionGrapher::new),
config: term::Config::default(),
config: cargo_deny::diag::codespan_config(),
feature_depth,
}),
max_severity,
Expand Down
Loading