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

Add config via setup.cfg #212

Closed
ericwb opened this issue Apr 27, 2018 · 6 comments · Fixed by #401
Closed

Add config via setup.cfg #212

ericwb opened this issue Apr 27, 2018 · 6 comments · Fixed by #401
Labels
enhancement New feature or request

Comments

@ericwb
Copy link
Member

ericwb commented Apr 27, 2018

Hi,

since a lot of other linters support configuration via the setup.cfg file, it might be a good feature here to.

I don't like to have a gazillion .files in my repo to setup all tests and linters.

BTW: AWESOME tool.

Thanks,
Joe

@ericwb ericwb added the enhancement New feature or request label May 9, 2019
@ericwb ericwb added this to the Distant Future milestone May 9, 2019
@MartinThoma
Copy link

I would like this to behave similar to flake8:

[bandit]
match_dir = foo_directory
select = B3
ignore = B311

I would expect this to:

  1. Set the target to "foo_directory".
  2. Execute all B3XX tests, except for B311.

@MartinThoma
Copy link

https://bandit.readthedocs.io/en/latest/config.html :

You need to pass the YAML-config file path explicitly with -c your.config.yaml. It might look like this:

skips: ['B101', 'B322']

@okainov
Copy link

okainov commented Sep 9, 2021

Not sure why this was closed as it's still valid.

@CTimmerman
Copy link

None of the config files mentioned on https://bandit.readthedocs.io/en/latest/config.html work in VS Code. Even # nosec at the top of the code doesn't work to skip B311.

@hydrargyrum
Copy link

Can someone reopen this issue since it's still not solved?

@xgmsx
Copy link

xgmsx commented Jul 4, 2023

Can someone reopen this issue since it's still not solved?

bandit --ini=setup.cfg

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

Successfully merging a pull request may close this issue.

6 participants