Skip to content

Allow suppressing warning[unmatched-source]: allowed source was not encountered #781

@takeoverjp

Description

@takeoverjp

Is your feature request related to a problem? Please describe.
We are using cargo-deny from CI in a number of internal repositories and have a list of sources which we consider acceptable that should be applied to all repositories.

Since not all repositories have dependencies covering the entire list of allowed sources we consistently get the below warning in some repositories:

warning[unmatched-source]: allowed source was not encountered
   ┌─ /home/takeo/work/file-observer-rs/deny.toml:32:4
   │
32 │   "https://xxx.yyy.zzz.xyz",
   │    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ no crate source matched these criteria

Describe the solution you'd like
Ideally we'd like to be able to add a config setting to our deny.toml which says that we do not care about unmatched sources from the whitelist, which would then suppress that warning.

Like unused-allowed-license = "allow".

Describe alternatives you've considered
We've considered two alternatives:

  1. Keep a separate list of licenses per repository and remove unused ones
  2. Live with the warning

We went with 2 for now, as option 1 creates unneeded overhead and the warning doesn't fail the CI job.

Additional context
This feature request is very similar with #352 .

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions