Community Packages

Please read this before reporting a bug:
http://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in Unsupported. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

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 Balló György (City-busz) - Monday, 18 March 2019, 08:09 GMT
Task Type Bug Report
Category Packages
Status Assigned
Assigned To Johannes Löthberg (demize)
Daniel M. Capella (polyzen)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 1
Private No

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

Comment by Daniel M. Capella (polyzen) - Tuesday, 19 March 2019, 00:03 GMT
As mentioned in the thread, a rewrite of the syntax file is planned.

Loading...