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

False positives for the syn crate

Open niklasf opened this issue 7 years ago • 3 comments

It looks like syn is particularly tricky. Looking at https://github.com/dtolnay/syn/search?p=1&q=unsafe&unscoped_q=unsafe I think there should be fewer real uses of unsafe:

Functions  Expressions  Impls  Traits  Methods  Dependency
0          25           1      0       2        ☢         └── syn v0.14.2

niklasf avatar Jun 26 '18 08:06 niklasf

Thank you for the report!

It looks like the Impl and Methods metrics are accurate.

The Expressions are probably too high since tests and examples are included, but the "unsafe" string literals and comments are not included. cargo-geiger make use of the same crate, syn, for parsing .rs files.

Related to: https://github.com/anderejd/cargo-geiger/issues/3

anderejd avatar Jun 26 '18 08:06 anderejd

Ah, thank you. Then this is just a duplicate of #3.

niklasf avatar Jun 26 '18 08:06 niklasf

Created a new issue for filtering examples: https://github.com/anderejd/cargo-geiger/issues/12

anderejd avatar Jun 26 '18 08:06 anderejd