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

Make -c support ini as well. #944

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix --ini
  • Loading branch information
CTimmerman committed Aug 20, 2022
commit 6509d765bf415643ef63972bf1bdc3937c8cc0ca
4 changes: 2 additions & 2 deletions bandit/cli/config_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@ def main():

try:
with open(args.output_file, "w") as f:
skips = args.skips.split(",") if args.skips else []
tests = args.tests.split(",") if args.tests else []
skips = args.skips if args.skips else []
tests = args.tests if args.tests else []

for skip in skips:
if not extension_loader.MANAGER.check_id(skip):
Expand Down
4 changes: 2 additions & 2 deletions bandit/cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -609,8 +609,8 @@ def main():
profile = _get_profile(b_conf, args.profile, args.config_file)
_log_info(args, profile)

profile["include"].update(args.tests.split(",") if args.tests else [])
profile["exclude"].update(args.skips.split(",") if args.skips else [])
profile["include"].update(args.tests if args.tests else [])
profile["exclude"].update(args.skips if args.skips else [])
extension_mgr.validate_profile(profile)

except (utils.ProfileNotFound, ValueError) as e:
Expand Down