4 ms·
I guess it depends on what you want out of a linter e.g. if you want it to check just syntax or semantics as well. Is “= NULL” syntactically correct?
by justusw 5y ago
I guess it depends on what you want out of a linter e.g. if you want it to check just syntax or semantics as well. Is “= NULL” syntactically correct?
- ThePadawan 5y agoA linter is supposed to tell you "you are probably making a mistake." "= NULL" is as syntactically correct in SQL as "if (x = null)" in C. If it wasn't, code highlighting or compiling would break, both of which are much much more obvious.
- deleted 5y ago[deleted]
- danachow 5y agoThe compiler checks syntax - if that’s all a linter did it wouldn’t be very useful.
- munk-a 5y ago`= NULL` is perfectly legal syntax - but it isn't doing what you think it is.
- ThePadawan 5y agoThat's what parent is saying. He is contrasting a compiler (which this isn't) to a linter (which this arguably also isn't).