Skip to content

Commit

Permalink
Also recognize proc macros as libraries
Browse files Browse the repository at this point in the history
Signed-off-by: Sergey "Shnatsel" Davidoff <[email protected]>
  • Loading branch information
Shnatsel committed Nov 14, 2023
1 parent 47f3c86 commit 76f32a2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cargo-cyclonedx/src/generator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,9 @@ impl SbomGenerator {
// classification
let cdx_type = if tgt.is_bin() {
Classification::Application
// sadly no .is_proc_macro() yet
} else if tgt.kind.iter().any(|kind| kind == "proc-macro") {
Classification::Library
} else if tgt.kind.iter().any(|kind| kind.contains("lib")) {
Classification::Library
} else {
Expand Down

0 comments on commit 76f32a2

Please sign in to comment.