mikkeloscar / gopkgbuild

A golang package for parsing Arch Linux PKGBUILDs
GNU General Public License v3.0
22 stars 5 forks source link

Make lex.go skip spaces #25

Closed kodo-pp closed 6 years ago

kodo-pp commented 6 years ago

This pull request should address issue #20 (if I understood it correctly) and make gopkgbuild skip spaces used for indentation in SRCINFO's.

mikkeloscar commented 6 years ago

Thanks for the PR! Could you add a test case for this in test_pkgbuilds/?

kodo-pp commented 6 years ago

Done! I have added PKGBUILD and SRCINFO from AUR package bash-snippets (its SRCINFO seems to have broken indentation). It is not a Core package however, so maybe this test case should be moved somewhere away from the script testing Core packages SRCINFO's, or the the test script should be modified not to say it's testing Core packages only.

mikkeloscar commented 6 years ago

Thanks!

Morganamilo commented 6 years ago

I'd like to point out I did 'fix' this problem already. I didn't really want to mess with the parser to I wrote my own https://github.com/Morganamilo/go-srcinfo. There's still two edge cases that I know of though.