Issue tracker moved to https://gitlab.archlinux.org/archlinux/aurweb/-/issues
FS#37618 - False handling of # in Strings
Attached to Project:
AUR web interface
Opened by Armin Fasold (bebna) - Sunday, 03 November 2013, 12:08 GMT
Last edited by Lukas Fleischer (lfleischer) - Saturday, 11 January 2014, 12:22 GMT
Opened by Armin Fasold (bebna) - Sunday, 03 November 2013, 12:08 GMT
Last edited by Lukas Fleischer (lfleischer) - Saturday, 11 January 2014, 12:22 GMT
|
DetailsAUR showed me a wrong description in PKGBUILD who contained this line:
pkgdesc="A free, fast and small automatic formatter for C, C++, C#, and Java source code." Which resulted to this on the package page: Description: "A free, fast and small automatic formatter for C, C++, C Changing C# to C-Sharp fixed this wrong behaviour and made clear that even in escaped strings line comments will be removed. I don't think this is intentional and found the bug in /web/html/pkgsubmit.php#n136 $line = preg_replace('/\s*#.*/', '', $line); Changing the regex to /#[^'"]+$/m should fix it in the most cases. A better way would be using multiple a bigger and more complex regex using multiple alternatives to differentiate comments in and outside of strings or don't use regex for it in the first place. Greetings. |
This task depends upon
Closed by Lukas Fleischer (lfleischer)
Saturday, 11 January 2014, 12:22 GMT
Reason for closing: Won't fix
Additional comments about closing: Use .AURINFO instead.
Saturday, 11 January 2014, 12:22 GMT
Reason for closing: Won't fix
Additional comments about closing: Use .AURINFO instead.
Comment by Lukas Fleischer (lfleischer) -
Sunday, 03 November 2013, 14:41 GMT
Please use .AURINFO for this kind of things. We won't improve the AUR PKGBUILD parser.