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

feat: support config file #95

Merged
merged 5 commits into from
May 19, 2022
Merged

feat: support config file #95

merged 5 commits into from
May 19, 2022

Conversation

G-Rath
Copy link
Owner

@G-Rath G-Rath commented May 18, 2022

This adds support for config files, which can be used for specifying ignores in a way that can be tracked e.g. in version control.

Right now the only valid config option is ignore which takes an array of OSV ids to be ignored (matching the --ignore flag), since that's the flag we have that makes sense to configure per-project, but I think this could be useful in future for supporting custom databases.

Config is merged with any flags, meaning if you specify ignores in both the config & as flags they'll all be taken (rather than just the ignores from flags or the config). You can use --no-config to tell the detector to not load any config files.

The config must be in YAML format, and the default config file is .osv-detector.yaml & .osv-detector.yml.

@G-Rath G-Rath marked this pull request as ready for review May 18, 2022 19:56
@G-Rath G-Rath merged commit 98cc63b into main May 19, 2022
@G-Rath G-Rath deleted the support-config branch May 19, 2022 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant