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

Question: pre-commit licensecheck failing because license unknown #102

Open
cpolzer opened this issue Jan 23, 2025 · 0 comments
Open

Question: pre-commit licensecheck failing because license unknown #102

cpolzer opened this issue Jan 23, 2025 · 0 comments
Assignees
Labels
question Further information is requested

Comments

@cpolzer
Copy link

cpolzer commented Jan 23, 2025

Before You Begin

Before proceeding, please make sure to follow these steps:

  • [ x] I have checked for similar questions in the project's issue tracker to avoid duplicates.
  • [ x] I have searched existing issues to see if this question has been asked before.

Your Question

When using licensecheck as a pre-commit-hook with poetry and its toml file, i have to enter the

[tool.poetry]
license="xxxxx"

so that the hook does not fail.

In my current setup I have to use a "self" defined license which "licensecheck" does not know:

 WARNING  | licensecheck.license_matrix:licenseLookup:107 - 'LICENSEREF-xxxx' License not identified so falling back to NO_LICENSE

Is there any way I can configure licensecheck so it does not fail the pre-commit-hook on this matter?

EDIT:
i found that i can set the license to "proprietary", the warning is gone - but still the pre-commit hook fails:

# file pyproject.toml
[tool.poetry]
license = "Proprietary"
# file .pre-commit-config.yaml
  - repo: https://github.com/FHPythonUtils/LicenseCheck
    rev: "2024.3"
    hooks:
      - id: licensecheck
        stages: [pre-commit]

Thanks in advance!

@cpolzer cpolzer added the question Further information is requested label Jan 23, 2025
@cpolzer cpolzer changed the title Question: lisencecheck failing because license unknown Question: pre-commit licensecheck failing because license unknown Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants