bandit icon indicating copy to clipboard operation
bandit copied to clipboard

Args parsing priority changed

Open ZenSecurity opened this issue 6 years ago • 3 comments

ini file goes first, if it's empty, then command-line arguments passed.

ZenSecurity avatar Jan 20 '20 13:01 ZenSecurity

After your last MR, arguments from file are not taken (https://github.com/PyCQA/bandit/commit/c6b1302e7b1ab1ad78799264d8ca7222f2c3d428) My small patch fixes this.

What do you think?

ZenSecurity avatar Jan 20 '20 13:01 ZenSecurity

I changed the order because currently "--ini INI_PATH" option is not working anymore with your latest change. https://github.com/PyCQA/bandit/blob/master/bandit/cli/main.py#L225 (takes default values) https://github.com/PyCQA/bandit/blob/master/bandit/cli/main.py#L311 (passes default values) https://github.com/PyCQA/bandit/blob/master/bandit/cli/main.py#L82 (breaks "--ini" parameter logic here) Do you have any suggestions?

ZenSecurity avatar Jan 20 '20 21:01 ZenSecurity

I changed the order because currently "--ini INI_PATH" option is not working anymore with your latest change. https://github.com/PyCQA/bandit/blob/master/bandit/cli/main.py#L225 (takes default values) https://github.com/PyCQA/bandit/blob/master/bandit/cli/main.py#L311 (passes default values) https://github.com/PyCQA/bandit/blob/master/bandit/cli/main.py#L82 (breaks "--ini" parameter logic here) Do you have any suggestions?

Yeah, we need to fix or revert my patch if it's now breaking existing function.

ericwb avatar Jan 21 '20 21:01 ericwb