-
Notifications
You must be signed in to change notification settings - Fork 148
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
Add a "Recommendations" section in lint output based on found issues #698
Conversation
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'd like it if I could disable this functionality if I don't need it, e.g. behind a flag such as --no-recommends
.
Otherwise LGTM.
Sure, I added a |
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.
Good to add this. Not sure about best approach for defining the text in the file and not sure if the --no-recommendations
flag is really necessary.
I agree that the flag doesn't help much in the current state and I'm leaning towards leaving it out here and adding some reduced output to a quiet flag or similar (in a separate issue/PR). |
FWIW, we have |
Let's throw it out if others don't see the value in it. I rather have this merged soon and have no strong opinions about meaning I'm fine either way. So feel free to remove it and merge this. |
ebd61a6
to
7fce296
Compare
I had to throw around the whole PR because of the JSON feature. Therefore, I put most of the logic into the I hope that matches your expecations. Please feel free to propose improvements for handling the recommendations in the class, I am not as familiar with best practices for classes as I should be. Note: I added another unsorted key, this time at the bottom. This is because I think that the recommendations resulting from the summary should be the last entry in the dictionary and JSON output. It complicates a few things but IMHO it's worth it. |
1a08a4f
to
6bffa6f
Compare
Based on errors in the report, print helpful background and possible solutions for the user as recommended next steps.
Signed-off-by: Carmen Bianca BAKKER <carmenbianca@fsfe.org>
d438cc5
to
4e3e78f
Compare
Fix #672
As noted in the referenced issue, some error messages of
reuse lint
are not really helpful if your experience with REUSE and/or licensing is limited.This PR attempts to improve the situation by adding a "Recommendations" section after the linting result, explaining the occured issues and how to best solve them (if there is an easy solution).
I'm not sure whether the position I implemented this in the code is ideal, but I liked that I could derive everything from the
report
object. Depending on what other issues we might want to explain, there might be better solutions, but I didn't invest many thoughts on this yet.Possible blockers:
--json
to lint #654 might need to be adapted, or this PR if JSON is added before.Please find the output below in a repo in which basically everything is broken:
New output of `reuse lint` on a very problematic repo