Skip to content

REUSE pre-commit hook checks all files #1405

@Irieo

Description

@Irieo

When working on v1.0 version I noticed that the REUSE pre-commit hook runs reuse lint which checks the entire repository, not just staged files. This is pretty annoying as it breaks the normal pre-commit workflow where hooks check what you're committing.

REUSE compatibility origins here #1382

For example, I have an unstaged file test.py

The following files have no copyright and licensing information:
* test.py

# SUMMARY

* [.....]
* Files with copyright information: 751 / 752
* Files with license information: 751 / 752

Unfortunately, your project is not compliant with version 3.3 of the REUSE Specification :-(

LLMs say that since the REUSE pre-commit hook (reuse lint) runs on the whole repository, one should either create a custom local hook (a wrapper bash script that applies reuse lint only to staged files) or remove files before committing. The former seems to me like overengineering for a very common issue that should have a simple solution, while the latter is not a solution at all.

What should be a good solution? @euronion @lkstrp

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions