cargo-deny
cargo-deny copied to clipboard
Line numbers in error/warning messages when referring to deny.toml are wrong
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
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.
Related: #136