logoalt Hacker News

eddd-dddelast Wednesday at 2:19 PM1 replyview on HN

I disagree. You'll be surprised to hear this, but source code... is just a very big string...

If you can run static analysis on that you can run static analysis on string literals. Much like how C will give you warnings for mismatched printf arguments.


Replies

mawekilast Wednesday at 2:52 PM

You might be surprised to hear that most compilers and static analysis tools in general do not inspect (string and other) literals, while they do indeed inspect all the other parts and structure of the abstract syntax tree.

show 1 reply