mleibman / SlickGrid

A lightning fast JavaScript grid/spreadsheet
http://wiki.github.com/mleibman/SlickGrid
MIT License
6.82k stars 1.98k forks source link

V2.0 #1067

Open adrianocomp opened 9 years ago

adrianocomp commented 9 years ago

Hi,

I'm a PhD candidate and I'm studying whether static verification tools source code as JSLint and JSHint are really effective in finding problems in the source code. I checked the latest version of its source code with JSHint and JSLint and found some significant problems.

The images below show the names of errors find by JSLint and JSHint. The number next to the error, means the time of this error appears in your code.

errors jshint errors jslint

This mistakes can lead to problems that are hard to solve. Solutions for this problems can be found here:

https://jslinterrors.com/

Do you agree with these problems? Yes or No? You want to fix this problems? Regards,

6pac commented 9 years ago

Hi adrianocomp,

I'm a little bit suspicious that you're mainly trying to get traffic to that website. But then, it's not a bad website. I use WebStorm for js editing, which has the lint/hint tools built in. I checked it out and there were indeed about 10 reasonably serious errors it picked up. However a lot of errors these tools flag are the result of them not understanding the syntax of more advanced javascript properly. I'd categorise them as roughly:

So they are useful to a point, but can be quite annoying when you have to trawl through a bunch of incorrectly flagged errors to find the one true error. This is what tends to put people off. I notice also that about 70% of the errors being flagged in my project are in the jQuery and other libraries. This is a sign in itself. These libraries tend to use nonstandard but highly optimised ('guru level') code structures. It would perhaps be good if the Lint user could flag their level of expertise (newbie, competent, guru) to tell the tool that suspicious but correct looking code is probably not a mistake but the work of a guru, or to at least allow different types of structure in this case.

Ben McIntyre

adrianocomp commented 9 years ago

Hi Ben,

Thanks for comments. They are very helpful.

Regards.