sonatype-nexus-community / jake

Check your Python environments for vulnerable Open Source packages with OSS Index or Sonatype Nexus Lifecycle.
https://jake.readthedocs.io/
Apache License 2.0
114 stars 24 forks source link

[BUG] Strict option placement for -w flag #99

Closed arichtman closed 2 years ago

arichtman commented 2 years ago

Hi all, not sure if this is even a bug but I encountered this when trying to set up pre-commit scans that were warn-only. When running Jake scans, the warn option is strictly positional.

Steps to reproduce the behavior:

  1. Run jake ddt -w
  2. See error jake: error: unrecognized arguments: -w

Expected behavior jake -h ddt is identical to jake ddt -x According to this jake -w ddt should be same as jake ddt -w

Screenshots image

Desktop (please complete the following information):

Additional context os-release:

NAME="Ubuntu"
VERSION="20.04.3 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.3 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
madpah commented 2 years ago

Hi @arichtman - again, thanks for taking the time to raise this issue.

So I'm clear, the flags -h, -v, -w and -X are designed to be global and come before the command (e.g. ddt).

Are you suggesting this should not be the case?

arichtman commented 2 years ago

Ah ok, then perhaps the -w would make sense after, as it does not apply to sbom subcommand?