FS#61923 - [pacman-contrib] Incorrect error highlighting in syntax/PKGBUILD.vim
Attached to Project:
Community Packages
Opened by James Harvey (jamespharvey20) - Wednesday, 06 March 2019, 04:02 GMT
Last edited by Daniel M. Capella (polyzen) - Friday, 18 February 2022, 05:52 GMT
Opened by James Harvey (jamespharvey20) - Wednesday, 06 March 2019, 04:02 GMT
Last edited by Daniel M. Capella (polyzen) - Friday, 18 February 2022, 05:52 GMT
|
Details
Description:
"vimfiles/syntax/PKGBUILD.vim" highlights two things as errors that it should not. As an example, the valid official PKGBUILD file for gdb: https://git.archlinux.org/svntogit/packages.git/plain/trunk/PKGBUILD?h=packages/gdb pkgname=(gdb gdb-common) ... sha1sums=(... 'SKIP') It highlights in: "pkgname" the '(', ' ', and ')'; and "sha1sums" the "SKIP". "pkgname" can of course be an array for split packages. Any of "md5sums", "sha1sums", "sha224sums", "sha256sums", "sha384sums", and "sha512sums" can of course contain "SKIP". Even though the error highlighting is technically wrong, maybe it's desired to be left as-is to discourage "pkgname" being a single element array or "SKIP" usage when inappropriate, etc. On the mailing list, Morten Linderud pointed out that without pacman-contrib's vim PKGBUILD files, vim aliases PKGBUILD's to filetype bash, which doesn't highlight improper errors. Perhaps pacman-contrib's vim PKGBUILD files could be considered for removal. I personally like the idea of having the stricter highlighting that pacman-contrib provides. Seeing top variables as the same color as functions for a PKGBUILD just feels weird after all this time, too. https://lists.archlinux.org/pipermail/arch-general/2019-March/046195.html There might of course be other valid PKGBUILD scenarios pacman-contrib's files don't handle, these are just the 2 I see a lot. Additional info: pacman-contrib 1.1.0-1 Steps to reproduce: $ vim <gdb PKGBUILD> |
This task depends upon
Closed by Daniel M. Capella (polyzen)
Friday, 18 February 2022, 05:52 GMT
Reason for closing: None
Additional comments about closing: Migrated to https://gitlab.archlinux.org/pacman/pacm an-contrib/-/issues/7
Friday, 18 February 2022, 05:52 GMT
Reason for closing: None
Additional comments about closing: Migrated to https://gitlab.archlinux.org/pacman/pacm an-contrib/-/issues/7
Comment by
Daniel M. Capella (polyzen) -
Tuesday, 19 March 2019, 00:03 GMT
Comment by Michael Laß (Bevan) -
Friday, 31 July 2020, 09:40 GMT
As mentioned in the thread, a rewrite of the syntax file is
planned.
Currently, vim also highlights dots in package names as error.
According to the wiki, those are fine though and in fact some
packages in the repositories contain dots in their names. Just
something to be considered in a rewrite as well.