Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create config that allows everything #562

Open
banool opened this issue Sep 7, 2023 · 6 comments
Open

Create config that allows everything #562

banool opened this issue Sep 7, 2023 · 6 comments
Labels
enhancement New feature or request

Comments

@banool
Copy link

banool commented Sep 7, 2023

I just started with cargo deny and I'm finding myself overwhelmed by the config. I was sort of hoping that if I just deleted everything it would deny nothing by default, but this doesn't seem to be the default behavior.

First off, I think this might be a nicer dev experience, allowing folks to opt in to checks over time. But barring that, I don't suppose there is an example config out there that means cargo deny check does nothing. I'd love to start with that and then add my own things to check.

Thanks a lot!

@banool banool added the enhancement New feature or request label Sep 7, 2023
@Jake-Shadle
Copy link
Member

Most config options have a default lint level that matches the default config that gets generated if you don't have one already or you run init. You can either edit that default config to allow everything, or use -A denied to allow errors, or you can run individual checks like cargo deny check license sources bans advisories and fix each section as you go. IMO these are enough tools to gradually integrate a suitable config for your project, but I suppose I am biased in this regard.

@banool
Copy link
Author

banool commented Sep 7, 2023

I managed to get a config that allows everything by default like this, at least for my project:

[advisories]
vulnerability = "allow"
unmaintained = "allow"
notice = "allow"
unsound = "allow"
yanked = "allow"

[licenses]
unlicensed = "allow"
copyleft = "allow"
default = "allow"

[bans]
multiple-versions = "allow"
wildcards = "allow"
workspace-default-features = "allow"
external-default-features = "allow"
deny = []

[sources]
unknown-registry = "allow"
unknown-git = "allow"

I think it'd make sense for this to be the default, otherwise people new to cargo deny will be hit with a bunch of issues out of the gate. But I understand having an opinionated set of default checks too. Just my two cents!

@repi
Copy link
Contributor

repi commented Sep 7, 2023

we typically want to be somewhat opinionated with this, but maybe one could add your full-allow config to the docs? so new users that want to approach it that way can use that?

@banool
Copy link
Author

banool commented Sep 7, 2023

That works for me! Want me to open a PR? If you point me to the right place in the docs that'd be helpful.

@banool
Copy link
Author

banool commented Sep 7, 2023

One other thing I need to change for this default is maybe including something about only checking normal deps, not build and dev deps, but I can't figure that out.

@banool
Copy link
Author

banool commented Sep 7, 2023

To keep it clean I asked about it here: #563.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants