Don’t Software Engineers Write JavaScript?

The other day, I posted the following to the Prototype Core mailing list:

Has anyone taken the time to verify that the numerous warnings
generated by running JavaScript Lint against Prototype are innocuous?

Prototype 1.5.1 generates 160 warnings. For example:

prototype.js:2300: WARNING: undeclared identifier: node

And looking at it, I can’t see why node wouldn’t be created as a global.

The response I received was distinctly underwhelming. Only one person responded, and his response was telling:

There’s a bunch of thread on JavaScript Lint floating around the mailing list already,

My position regrading JS Lint is that if it requires [us] to go through 160 warnings to find one that really is an issue, its certainly not the best tool for the job.

Regarding the particular warning which you mention, there’s indeed a variable declaration missing here.

Any time for a patch? That would be much appreciated!

When I was in school, in addition to learning how to chisel my homework into stone tablets, the professor in my software engineering class drilled into our heads that we should use every possible tool to make our code better and have fewer bugs. He was talking at the time about C lint checkers, because C compilers didn’t catch all the nit-picky stuff they do now.

It just boggles my mind that no one is willing to take the time to explore merely 160 warnings. This is source code that’s never been checked before, so of course it will have lots of warnings. It’s a one time pain in the ass that you just have to endure. Make 0 warnings a criteria for new code commits. But check your code with every possible tool to make it better.

The really infuriating thing is that I just picked the first undeclared identifier warning and I found a bug. And the Prototype Core team doesn’t seem interested.

Update: After a recent public flap stirred up by this post, I was reminded that I’d left out the last line of the message regarding providing a patch. I haven’t and won’t provide a patch. I don’t actively use Prototype. So fixing the bugs in a library I don’t actively use isn’t a high priority for me. I’m merely attempting to evaluate Prototype’s suitability for future projects. Part of that suitability is whether the core development team is committed to using every tool at their disposal to ensure code quality. As far as I can tell, they are not.