cargo-deny icon indicating copy to clipboard operation
cargo-deny copied to clipboard

Line numbers in error/warning messages when referring to deny.toml are wrong

Open sdroege opened this issue 3 years ago • 2 comments

This for example is a [[bans.skip]] around line 30 and nothing around line 1.

warning: skipped crate was not encountered
  ┌─ /home/slomo/Projects/rust/gst-plugin-rs/deny.toml:1:1
  │
1 │ [advisories]
  │ ^ no crate matched these criteria

sdroege avatar Sep 23 '20 06:09 sdroege

This is a limitation with how we get span information when parsing the toml configuration files, which is essentially just a copy of what the toml crate itself does, we just tend to always use inline arrays/objects, which does work correctly.

I think fixing this would be very valuable, since I'm now remembering this is the same issue for why we cheat and generate some toml when displaying the spans for where a value came from in a Cargo.toml manifest, but I might not be able to get to it for a while.

Jake-Shadle avatar Sep 23 '20 07:09 Jake-Shadle

Related: #136

Jake-Shadle avatar Sep 23 '20 07:09 Jake-Shadle