DescriptionCheck: check for description repeating package name#781
DescriptionCheck: check for description repeating package name#781mgorny wants to merge 1 commit intopkgcore:masterfrom
Conversation
|
Results ( Details |
Signed-off-by: Michał Górny <mgorny@gentoo.org>
| elif s.startswith(lower_pn) and s.removeprefix(lower_pn).startswith( | ||
| (" is", " -", ":", ",") | ||
| ): | ||
| yield BadDescription("repeats package name", pkg_desc=desc, pkg=pkg) |
There was a problem hiding this comment.
is there any reason to do this, rather than just saying "don't use the package name in the package description" ?
There was a problem hiding this comment.
Are you asking why the "is" etc. logic or the check in general?
There was a problem hiding this comment.
No, I mean why should the pkgcheck package description ever need to actually use the word 'pkgcheck' in it? pkgcheck is is the english lead in for pkgcheck; is there a reason to try to catch phrases like this, rather than just saying "there's 99% no valid reason to use the package name in the description"?
There was a problem hiding this comment.
Because otherwise there's a lot of false positives when package name reasonably matches what it does.
For example:
[N] dev-python/base58 ((~)2.1.1): Base58 and Base58Check implementation
ferringb
left a comment
There was a problem hiding this comment.
No complaints from me, sans the usual bike shedding.
| if s.startswith("based on") and "eclass" in s: | ||
| yield BadDescription("generic eclass defined description", pkg_desc=desc, pkg=pkg) | ||
| elif s in (pkg.package.lower(), pkg.key.lower()): | ||
| elif s in (lower_pn, pkg.key.lower()): |
There was a problem hiding this comment.
I don't hugely care, but this blocks now feels redundant- your more specific error below is clearer than "generic package name", imo.
There was a problem hiding this comment.
I was wondering about that too. But I figured out there's a difference between package description being completely meaningless (i.e. 100% repeat of PN) vs. having redundant prefix.
There was a problem hiding this comment.
Yeah, my core thought here is "generic description" doesn't really mean much.
"this is a package for python". That's generic.
"pkgcheck" for pkgcheck's description is not generic as much as someone needing a wedgie, and calling it generic is accurate, but just feels off to me.
^^^ that's bikeshedding territory, to be clear. Whatever you or others think is best works for me- the check you're adding is the one with higher value imo.
No description provided.