traditionally with linux, you can put cmdline options anywhere on the cmdline and the binary will parse it ... you use -- to flag when to stop parsing ... also, typing `lintool --show-details <ebuild>` is a real pita ... i would love like `lintool -sd <ebuild>` ;) but nice work as it is, its slick
also i noticed that lintool doesnt pick up on when you have excess spaces after 'function() {' statements ... i had an ebuild that looked like: function() {\t\t\t\t\t and it was not caught ...
strings are not parsed correctly sometimes ... - (W) Has illegal white space (marked by %), only one space character allowed: | einfo "*%%%%%%%\ the line is: einfo "* \"man wine\" *"
multiple LICENSES arent supported ... right now we use these 2 convections: LICENSE="GPL-2 LGPL-2" LICENSE="GPL-2 | LGPL-2"
and lintool doesnt like it if you mess with the destination of a pipe ... root@rux0r app-misc # lintool --show-details --show-separate */*.ebuild | ASFD bash: ASFD: command not found Traceback (most recent call last): File "/usr/bin/lintool", line 317, in ? main() File "/usr/bin/lintool", line 301, in main showStatus(options,tests,formatter,fn) File "/usr/bin/lintool", line 103, in showStatus formatter.bullet(formatter.div(j.getDesc(), ": " + j.getStatus())) File "/usr/bin/lintool", line 28, in bullet print "* " + s IOError: [Errno 32] Broken pipe
LICENSE="freedist" # Readme.txt says "BLAHBLAH" * Testing for proper LICENSE : failed - (E) License 'freedist" # Readme.txt says "BLAHBLAH' is not known doesnt ignore stuff past comments correctly ...
also would be nice if lintool would check for outdated SRC_URI ... you could parse /usr/portage/profiles/thirdpartymirrors for the base URL's and then suggest what it should be ...
also, lintool only parses USE flags that match the regex [a-z0-9] ... what about 'libg++' ? :)
I think I found a little bug in Lintool 0.2.3: Warnings may disappear when checking multiple ebuilds: lucky sys-apps # lintool --show-details powerprefs/powerprefs-0.2.ebuild ------------------------------------------------------------------------------- Status for powerprefs/powerprefs-0.2.ebuild * Testing for correct formatting : passed * Testing for malformed headers : passed * Testing for occurence of deprecated try : passed * Testing for superfluous A=${P}.tar.gz : passed * Testing for empty DEPEND : passed * Testing for empty HOMEPAGE : passed * Testing for empty DESCRIPTION : passed * Testing for presence of env vars : passed - (W) Missing RDEPEND= * Testing for sane USE flag usage : passed * Testing for proper LICENSE : passed ------------------------------------------------------------------------------- Summary for all 1 ebuild(s) checked #errors/warns Testing for correct formatting : 0 / 0 Testing for malformed headers : 0 / 0 Testing for occurence of deprecated try : 0 / 0 Testing for superfluous A=${P}.tar.gz : 0 / 0 Testing for empty DEPEND : 0 / 0 Testing for empty HOMEPAGE : 0 / 0 Testing for empty DESCRIPTION : 0 / 0 Testing for presence of env vars : 0 / 1 Testing for sane USE flag usage : 0 / 0 Testing for proper LICENSE : 0 / 0 Total number of ebuilds with errors 0 ( 0%) Total number of ebuilds with warnings 1 (100%) lucky sys-apps # lintool --show-details powerprefs/powerprefs-0.* ------------------------------------------------------------------------------- Status for powerprefs/powerprefs-0.2.1.ebuild * Testing for correct formatting : passed * Testing for malformed headers : passed * Testing for occurence of deprecated try : passed * Testing for superfluous A=${P}.tar.gz : passed * Testing for empty DEPEND : passed * Testing for empty HOMEPAGE : passed * Testing for empty DESCRIPTION : passed * Testing for presence of env vars : passed * Testing for sane USE flag usage : passed * Testing for proper LICENSE : passed ------------------------------------------------------------------------------- Status for powerprefs/powerprefs-0.2.ebuild * Testing for correct formatting : passed * Testing for malformed headers : passed * Testing for occurence of deprecated try : passed * Testing for superfluous A=${P}.tar.gz : passed * Testing for empty DEPEND : passed * Testing for empty HOMEPAGE : passed * Testing for empty DESCRIPTION : passed * Testing for presence of env vars : passed * Testing for sane USE flag usage : passed * Testing for proper LICENSE : passed ------------------------------------------------------------------------------- Status for powerprefs/powerprefs-0.3.1.ebuild * Testing for correct formatting : passed * Testing for malformed headers : passed * Testing for occurence of deprecated try : passed * Testing for superfluous A=${P}.tar.gz : passed * Testing for empty DEPEND : passed * Testing for empty HOMEPAGE : passed * Testing for empty DESCRIPTION : passed * Testing for presence of env vars : passed * Testing for sane USE flag usage : passed * Testing for proper LICENSE : passed ------------------------------------------------------------------------------- Summary for all 3 ebuild(s) checked #errors/warns Testing for correct formatting : 0 / 0 Testing for malformed headers : 0 / 0 Testing for occurence of deprecated try : 0 / 0 Testing for superfluous A=${P}.tar.gz : 0 / 0 Testing for empty DEPEND : 0 / 0 Testing for empty HOMEPAGE : 0 / 0 Testing for empty DESCRIPTION : 0 / 0 Testing for presence of env vars : 0 / 0 Testing for sane USE flag usage : 0 / 0 Testing for proper LICENSE : 0 / 0 Total number of ebuilds with errors 0 ( 0%) Total number of ebuilds with warnings 0 ( 0%)
and I think this one does not need any comment ;-) lucky sys-apps # lintool --show-details /usr/portage/sys-apps/tar/tar-1.13.25-r3.ebuild ------------------------------------------------------------------------------- Status for /usr/portage/sys-apps/tar/tar-1.13.25-r3.ebuild * Testing for correct formatting : passed * Testing for malformed headers : passed * Testing for occurence of deprecated try : failed - (E) Uses try, which is deprecated |DESCRIPTION="Use this to try make tarballs :)" * Testing for superfluous A=${P}.tar.gz : passed * Testing for empty DEPEND : passed * Testing for empty HOMEPAGE : passed * Testing for empty DESCRIPTION : passed * Testing for presence of env vars : passed * Testing for sane USE flag usage : passed * Testing for proper LICENSE : passed ------------------------------------------------------------------------------- Summary for all 1 ebuild(s) checked #errors/warns Testing for correct formatting : 0 / 0 Testing for malformed headers : 0 / 0 Testing for occurence of deprecated try : 1 / 0 Testing for superfluous A=${P}.tar.gz : 0 / 0 Testing for empty DEPEND : 0 / 0 Testing for empty HOMEPAGE : 0 / 0 Testing for empty DESCRIPTION : 0 / 0 Testing for presence of env vars : 0 / 0 Testing for sane USE flag usage : 0 / 0 Testing for proper LICENSE : 0 / 0 Total number of ebuilds with errors 1 (100%) Total number of ebuilds with warnings 0 ( 0%)
yeah, ive noticed the problem when passing multiple ebuilds ... when a bug was submitted about lintool, i would do like: cd /usr/portage/sys-apps lintool --show-details */*.ebuild and i wouldnt get the same results as the reporter ... he had more warnings than i did ... (RDEPEND being the biggest one i think ... then again it could be that there are a lot of ebuild's that dont define that ...)
when running `lintool --show-separate --show-details`, i find it pretty useful to parse out the 'passed' lines ... lintool --show-separate --show-details */*.ebuild | grep -v passed | more it makes going through the ebuilds a lot faster because i get output that only shows errors ... ------------------------------------------------------------------------------- Status for feh/feh-1.2.0.ebuild ------------------------------------------------------------------------------- Status for gimp-freetype/gimp-freetype-0.2-r2.ebuild - (W) Has illegal white space (marked by %), only one space character allowed: | --sysconfdir=/etc/gimp/1.2/%\ ------------------------------------------------------------------------------- Status for gimp-print/gimp-print-4.2.1.ebuild ------------------------------------------------------------------------------- Status for gimp-print/gimp-print-4.2.2.ebuild
not sure whats causing this, but when you use lintool on the ebuild media-gfx/povray/povray-3.1g-r5.ebuild, you get this error: Status for povray/povray-3.1g-r5.ebuild * Testing for sane USE flag usage : failed - (E) Unknown USE flag 'version'
Should add tests for IUSE and sanctioned KEYWORDS.
Awareness of environment variables that are inherited from eclasses would be nice as well.
*** Bug 9296 has been marked as a duplicate of this bug. ***
multi-line strings might want to be handled too ... echo " what a use with test blalasdfasdf " this gets detected as having invalid USE variable 'with'
are variables parsed correctly if they arent padded with "" ? i had an ebuild that was 'LICENSE=GPL' and it wasnt detected as being invalid ... but another ebuild that was 'LICENSE="GPL"' was detected as invalid
Lintool 0.2.3, "lintool --changelog" has problems with categories that contain numbers, like "x11-plugins". Do you like this patch? diff -u /usr/lib/python2.2/site-packages/lintool/test.py.orig /usr/lib/python2.2/site-packages/lintool/test.py --- /usr/lib/python2.2/site-packages/lintool/test.py.orig 2002-10-20 22:33:56.000000000 +0200 +++ /usr/lib/python2.2/site-packages/lintool/test.py 2002-10-20 21:34:58.000000000 +0200 @@ -26,5 +26,5 @@ PN = "[a-zA-Z_.-]+" PV = "[a-z0-9A-Z_.-]+" P = PN + "-" + PV + "(-r[0-9]+)?" - category = "[a-z]+-[a-z]+" + category = "[a-z0-9]+-[a-z0-9]+" full = category + "/" + P
Some of these issues are fixed in lintool-0.2.4. I'm not sure I'll bother handling all, but the easiest have been fixed.
This bug is a complete abuse of Bugzilla. Given that Karl has addressed some of these issues in 0.2.4. I am resolving this bug, and any remaining issues can be reopened as new INDIVIDUAL bugs. But for everyone's sake (users and devs), each bug needs to be reported seperately - not lumped together like this. If someone forwards me a mail of which Comment's are still valid, I would be happy to do this administrivia myself. But please use Bugzilla properly or this kind of chaos will spread. :) Reasoning: searching is ruined like this, and things will end up sliping through the cracks. If you really want a problem solved, make it stand on its own. Dependency tracking would have been the best way to have dealt with these bugs; starting one bug and making all others parented from it. I'll do that too, if someone desires.