Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Code coverage for your AWK programs (benhoyt.com)
46 points by benhoyt on Dec 10, 2022 | hide | past | favorite | 3 comments


This demo written in awk and linked in the article is very impressive:

https://youtu.be/j5aEjfBSQRI


Are there any linters for AWK programs?


I don't know of a stand-alone one. Gawk has the "--lint" option, which is documented to "Warn about constructs that are dubious or nonportable to other awk implementations ... Some warnings are issued when gawk first reads your program. Others are issued at runtime, as your program executes."

I've never used it, so I'm not sure the range of warnings it generates. Given that some of its checks are done at runtime, I suspect you have to be careful if you want to only use it as a static linter ahead-of-time.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: