ExcessiveLineLength should be ignored in SRC_URI
.
Can you please give an example where this was met? I have added some relaxation points for this check, so I'm curious where it was hit and why my relaxation rules didn't work.
$ pkgcheck scan app-containers/lxd/
Please include in future:
- pkgcheck version
- pkgcheck output if appropriate
- commit hash of the relevant repository (like ::gentoo)
- relevant excerpts of any ebuild (or at least a link to it)
This makes it a lot easier to go back and verify something if the tree state has changed since, for example.
Reproduced at 61232ea28c66cd5e0709a5227878ea709bbcffb8 w/ :
$ pkgcheck --version
pkgcheck 0.10.21-3-g4247e10 -- Fri, 30 Dec 2022 21:27:23 +0200
$ pkgcheck scan app-containers/lxd
app-containers/lxd
ExcessiveLineLength: version 5.0.1-r3: excessive line length (over 120 characters) on lines: 11, 12
RedundantVersion: version 5.0.1-r3: slot(0) keywords are overshadowed by version: 5.0.1-r4
StableRequest: version 5.0.1-r3: slot(0) no change in 30 days for unstable keyword: [ ~amd64 ]
StaticSrcUri: version 5.0.1-r3: '5.0' in SRC_URI, replace with $(ver_cut 1-2)
ExcessiveLineLength: version 5.0.1-r4: excessive line length (over 120 characters) on lines: 11, 12
StaticSrcUri: version 5.0.1-r4: '5.0' in SRC_URI, replace with $(ver_cut 1-2)
In lxc-5.0.1-r4, we have:
[...]
DESCRIPTION="Modern, secure and powerful system container and virtual machine manager"
HOMEPAGE="https://linuxcontainers.org/lxd/introduction/ https://github.com/lxc/lxd"
SRC_URI="https://linuxcontainers.org/downloads/lxd/${P}.tar.gz
https://github.com/lxc/lxd/commit/d55a590ea50a75c3cb2ea67894be8253074d6093.patch -> lxd-5.0.2-move-shellcheck-version-call-into-static-analysis.patch
https://patch-diff.githubusercontent.com/raw/lxc/lxd/pull/11011.patch -> lxd-5.8-add-tcp-keepalives-to-exec-channels.patch
verify-sig? ( https://linuxcontainers.org/downloads/lxd/${P}.tar.gz.asc )"
[...]
I agree that we should probably exempt SRC_URI entirely, although I suspect @mgorny will feel differently.
Sorry, https://github.com/pkgcore/pkgcheck/issues/514#issuecomment-1374608754 wasn't mean to come out that rude. 1 minute after posting that I was already in bed :)
as to the original issue post, I guess I just couldn't see a case where ExcessiveLineLength ever makes sense in the SRC_URI field.
Don't we exempt long single-word lines from this already?
Sorry, #514 (comment) wasn't mean to come out that rude. 1 minute after posting that I was already in bed :)
as to the original issue post, I guess I just couldn't see a case where ExcessiveLineLength ever makes sense in the
SRC_URIfield.
No worries! I think we should probably have an issue template anyway. I'm anal about getting those bits of info just because we sometimes have these bugs where they're not reproducible even though I believe they happened, so it makes it easier if you come back to it in a few weeks
If I may speak a little about "styling" (which is the level of result - "style")
The code in question is:
SRC_URI="https://linuxcontainers.org/downloads/lxd/${P}.tar.gz
https://github.com/lxc/lxd/commit/d55a590ea50a75c3cb2ea67894be8253074d6093.patch -> lxd-5.0.2-move-shellcheck-version-call-into-static-analysis.patch
https://patch-diff.githubusercontent.com/raw/lxc/lxd/pull/11011.patch -> lxd-5.8-add-tcp-keepalives-to-exec-channels.patch
verify-sig? ( https://linuxcontainers.org/downloads/lxd/${P}.tar.gz.asc )"
Notice how even here in github it is very hard to read the whole line. Maybe you added some incorrect symbol at the end of line - hard to see.
Now, the same as we do for dev-python packages, you can break the URI after -> making it much easier to read:
SRC_URI="https://linuxcontainers.org/downloads/lxd/${P}.tar.gz
https://github.com/lxc/lxd/commit/d55a590ea50a75c3cb2ea67894be8253074d6093.patch
-> lxd-5.0.2-move-shellcheck-version-call-into-static-analysis.patch
https://patch-diff.githubusercontent.com/raw/lxc/lxd/pull/11011.patch
-> lxd-5.8-add-tcp-keepalives-to-exec-channels.patch
verify-sig? ( https://linuxcontainers.org/downloads/lxd/${P}.tar.gz.asc )"
Note that the URL itself (the part before ->) can be as long as needed - it is exempt from excessive length check. But here you clearly can break it into 2 separate readable lines, so why not?
(If I sound too harsh, sorry, I'm trying to show my idea and thoughts, I'm open to other ideas)
I personally dislike that, I've accustomed to reading one line in SRC_URI. In my eyes your proposal, which did occur to me too, looks messy and is way more annoying to write.
Besides you'd only do it when pkgcheck reports ExcessiveLineLength, and that'd make it inconsistent along the tree. I feel like pkgcheck would nag to comply here and annoy more people than just me.