Kogia-sima / rust-covfix

Fix Rust coverage data based on source code
MIT License
14 stars 3 forks source link

Reasoning behind the #[derive()] macro rule #8

Open jerel opened 1 year ago

jerel commented 1 year ago

Thanks for this project. I have a question about the operation of rust-covfix's derive rule. In my project we use serde heavily so there's lots of modules with structs annotated with derive macros. My observation is that, as of Rust 1.67, the structs are correctly tracked with regard to whether they are used by a called function or not but instead of the struct being highlighted only the derive line is marked red or green. After running rust-covfix on it the structs are completely omitted, neither the struct or the derive line is red or green. Any comments on what is the expected behavior and why you chose to add a rule which filters out derive lines?

Here's another thing I'm noticing: often a file will have a single opening use line that's marked green: Screenshot from 2023-03-02 22-56-46