-
Notifications
You must be signed in to change notification settings - Fork 154
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
feat: lint-file subcommand #1055
Conversation
Hi @klmcadams ! Thank you so much for this PR. Unfortunately I do not have time to review it this or next week. |
@carmenbianca that's okay! Thanks for letting me know |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did a cursory review. There's a number of things that need to change. Because I have time and this feature has some priority for me, I will work on patching this PR up.
Thank you @klmcadams !
@carmenbianca Thanks for the review! Let me know if I can help in any way |
Signed-off-by: Carmen Bianca BAKKER <[email protected]>
Signed-off-by: Carmen Bianca BAKKER <[email protected]>
Signed-off-by: Carmen Bianca BAKKER <[email protected]>
63e626f
to
46e42a1
Compare
Rebased on top of main to fix a problem I had (#1067) while testing, and patched this up in one rather big commit. Because the behaviour of Thanks a lot for the template to work on top of @klmcadams ! You had a lot of the right ideas. If you have time, I would love a code review on this. If not, that is very understandable :) It's taken me a month to respond to you, after all. edit: Of course the tests fail on CI and not on my computer! I'll need to fix that, too. |
Signed-off-by: Carmen Bianca BAKKER <[email protected]>
This worked on my machine, but not on the CI. I'm convinced that my filesystem (btrfs) iterates over files very differently compared to ext4. Signed-off-by: Carmen Bianca BAKKER <[email protected]>
Signed-off-by: Carmen Bianca BAKKER <[email protected]>
2a01758
to
7f04e3c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. You just need to remove the "Unused licenses" section from reuse-lint-file.rst
.
Signed-off-by: Carmen Bianca BAKKER <[email protected]>
Signed-off-by: Carmen Bianca BAKKER <[email protected]>
66648cc
to
62222cb
Compare
Signed-off-by: Carmen Bianca BAKKER <[email protected]>
62222cb
to
15861d2
Compare
Perfect, merging! I'll get a release of this out the door some time soon. Thank you @klmcadams and @SMoraisAnsys ! |
Added
lint-file
subcommand to allow people to lint specified file(s). In the command line, you can runreuse lint-file <files>
. For example,reuse lint-file src/reuse/download.py src/reuse/_annotate.py
. If you only runreuse lint-file
with no files listed, then it will lint all files (as if you were just runningreuse lint
).Let @SMoraisAnsys or I know if you have any questions or concerns! This PR addresses the suggestions in #903.
Here is a picture of running
reuse lint-file
in the command line with a file that doesn't exist (dne_file.py), two files that exist and are compliant, and one file that exists but is not compliant (empty_file.py):changelog.d/<directory>/
.AUTHORS.rst
.docs/man/
or elsewhere.the current specification.
changed files.