On 5/8/07, Alessio 'mOLOk' Bolognino <themolok.ml@gmail.com> wrote:
On 23:35 Mon 07 May , Aaron Griffin wrote:
On 5/7/07, Alessio 'mOLOk' Bolognino <themolok.ml@gmail.com> wrote:
On 19:04 Mon 07 May , Dan McGee wrote:
On 5/7/07, Alessio 'mOLOk' Bolognino <themolok.ml@gmail.com> wrote:
Well, I improved it a bit, the new patch is based on the current repo (not on the old patch), so, if you want to try it, apply this one only. Here is a little feature list: it marks: invalid pkgname (strange or >32 chars); pkgrel (containing hyphens or other shit); pkgrel (everything but digits); pkgdesc too long (>80 chars) and pkgdesc containing "foobar is a" that is a common error (800+ packages in the AUR begins with this description...); wrong url (without http:// and others); wrong licenses (everything but the common ones and custom:foobar) wrong arch (not i686 || x86_64 || ppc) non standard .install file (i.e. without the .install suffix ) specific sourceforge mirror in the source array (very common error too) md5sums != 32 chars sha1sums != 40 chars wrong options (and marks "no" in nooption in yellow because it is deprecated); In the build() it is used the sh.vim syntax-file.
I think this syntax file is very useful while checking users' packages and avoids some common errors. Enjoy it VIMmers :)
First of all, thanks for the suggestions
Just tried it out and I like it, and I have a few suggestions as well. * I noticed you tried to vary the colors used for pkgname, pkgver, conflicts, replaces, etc. This may seem bright and colorful, but I personally don't like it at all. I would rather everything on the right side of the equals sign be the same color (the only exception being things in quotes or things not in quotes).
OK, I can keep it more sober. I'll change the colors to look like sh.vim (the shell syntax-file)
Done, now it uses much less colors, very similar to sh.vim
* I couldn't get the illegal md5sum/sha1sum highlighting to ever work.
Mmm... Strangely enough here it works, this is the intended behaviour: if the hash is <32 chars, it should be marked all red (well, the color changes according with your vimrc, but it is usually red), if the hash is
32chars, the chars after the 32nd should be marked red. (A couple of people tested it and it works on their machine too)
* Multi-line arrays without a '\' on end of lines do not highlight properly.
It's not a bug, it's a feature! :D Seriously, I think you noticed this in the source array, it highlights the remote files only, not the local ones.
* There are a lot of commented out lines in the file; I think it would be much clearer if anything unnecessary is removed.
Well, you're right :)
I cleaned it a lot
Although I said a lot there, it is good enough to find a place in my GIT tree. <http://code.toofishes.net/gitweb.cgi?p=pacman.git;a=commit;h=d45f977e0657881a542586f688e675c2b010a894>
I'll improve it in my spare time and I'll send here patches.
Except for Dan's comments about the varying colors, I like it. Next update I'll stick it in the contrib dir.
New patch (based on the current pacman repo). Here you are the "colorphobic" version (much less colors :)
It is in the official GIT tree now, which has a location on archlinux.org: <http://projects.archlinux.org/git/gitweb.cgi?p=pacman.git;a=summary> In addition, it can be pulled or checked out with the following URL: http://projects.archlinux.org/git/pacman.git -Dan