outsideris / popularconvention

analyzing code convention from github commits for Github data challenge II

Home Page:http://sideeffect.kr/popularconvention/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

semicolon use in javascript

eMBee opened this issue · comments

popular convention and recomendation in many docs seems to be to always put a semicolon at the end of statements in javascript. but it is by no means required, so it would be nice to see real statistics, how much code is out there that does not put semicolons everywhere.

similar cases might exist in other languages, eg python and ruby (and it looks like scala too) use the semicolon to seperate mutiple statements on one line. so optional semicolons could be found there too (however unlikely)

Thank you for your suggestion.
But It is pretty hard to implement in my project. It doesn't analyze contextual code. Just analyze string token by single line.
So I can't identify a line should have semicolon or not. For example, if (true) { and console.log(true);.