FHPythonUtils/LicenseCheck

Bug: --using doesn't seem to work (always uses requirements.txt)

flodolo opened this issue · 2 comments

Before You Begin

Before proceeding, please make sure to follow these steps:

  • I have checked for similar issues in the project's issue tracker.
  • I have searched closed issues to see if a similar problem was reported
    before.

Issue Details

I have a folder with multiple requirement files:

  • default.txt
  • dev.txt
  • lint.txt
  • test.txt

licensecheck --using 'requirements:dev.txt' fails with RuntimeError: Could not find specification of requirements (requirements.txt). It looks like licensecheck always searches for requirements.txt.

On a side note, the documentation in README seems inconsistent around the formatting of multiple requirement files: is it requirements:requirements.txt;requirements_optional.txt or requirements:requirements.txt;requirements:requirements_optional.txt (with requirements: repeated after the semicolon)? Both are used in the explanation.

System Information

Please provide the following additional information about your system or
environment:

  • Operating System (OS): macOS
  • OS Version: 14.6.1

Should this line be the other way around?

requirementsPaths = extras if len(extras) > 0 else ["requirements.txt"]

UPDATE: double-check the README, can't find the double requirements:, so I must have misread it.

Hi thanks for opening the issue. Going to take a look at this asap. There is absolutely a logic error there that I did not pick up during a recent refactor!