-
Notifications
You must be signed in to change notification settings - Fork 157
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
Allow specifying a set of files/directories to lint #512
Comments
This functionality used to exist, but was removed during a refactoring, I believe. Reintroducing this is a little bit tricky, because certain tests would have to be disabled when running the linter only against a few files. The code is already a bit of a spaghetti that is held together by unit and integration tests. Adding this as more spaghetti would be slightly tricky, but not impossible, but I'm starting to think that maybe some untangling is in order. Thanks for the suggestion, though, @bcbernardo ! Adding this to TODO. |
In today's maintainers call, we picked this as a feature for the next release. Some questions are up for discussion:
What's certain is that the whole project scope must considered, so that the given file/directory is also recognised as compliant if it's covered in the dep5 file, with a separate |
For all these open questions, my take is to try to get the closest experience possible to other widely used formatters & linters, such as black, isort and flake8. Taking the mentioned tools as examples, I believe all of them:
Personally I find these choices quite sensible. |
I will also add that having the option to run Other than that, thanks for the great tool! |
The FOSSLight wrapper for REUSE already has some functionality to provide a path: https://github.com/fosslight/fosslight_reuse/blob/52be30048f7a93ca4ddabce0a90236c9bf3acff7/src/fosslight_reuse/cli.py#L15 |
In today's call we clarified some more questions regarding this feature and its relation with other features we're working on:
|
Implemented in #1055. It doesn't recursively do directories, so you'd need to use your shell's glob expansion for that. Thanks! |
Hi! Thanks for the great tool!
I have a feature request that would greatly improve my current workflow with
reuse-tool
, that includes a step in my pre-commit hooks that callsreuse lint
against the project.I think it would be more adequate for this use case if only staged files were checked. However,
reuse lint
currently has no way of restricting its checks to a specific set of files.I understand reuse tool currently focus on compliance with reuse spec at the project level, but I think it would be nice it took a number of arguments to its command line, indicating which files to lint:
When paired with a pre-commit hook, this API would not force the current contributor to make a big commit solving all licensing problems in the project, but would instead make sure that her contributions (only) have proper license and copyright information.
The text was updated successfully, but these errors were encountered: