Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#43 closed Task (fixed)

JavaScript Lint Reporting

Reported by: Frederico Caldeira Knabben Owned by: Alfonso Martínez de Lizarrondo
Priority: Normal Milestone:
Component: General Version:
Keywords: Cc:


It would be wonderful to have an automated reporting system generated using JavaScript Lint that checks all .js and .html files in the distribution package for inconsistencies.

Maybe JavaScript Lint is not the right tool for us, but we should give it a try and see the results. It is quite configurable, so we can properly set the warning level to our needs.

Change History (4)

comment:1 Changed 12 years ago by Alfonso Martínez de Lizarrondo

In my branch I've added a new subdirectory in the automated test to launch a basic lint of the js files and fixed those warnings. I've removed from the checks several of the warnings as I didn't want to start messing around too much, and I've restricted the checked files to only those because the universal keyboard has tons of warnings, but as it's planned to remove them I don't see any reason to do the effort and clean them.

As we move forward we can enable more warnings if we find them interesting and of course expand the check to all the js and html files.

comment:2 Changed 12 years ago by Frederico Caldeira Knabben

This is great Alfonso.

I would only ask you to please move it under "_dev":

_dev/bin/ (all necessary exe files)

And go ahead merging it to the trunk.

The automated test folder should be used exclusively for the automated test system, based on JsUnit.

comment:3 Changed 12 years ago by Alfonso Martínez de Lizarrondo

Owner: set to Alfonso Martínez de Lizarrondo
Status: newassigned

Ok, I've done it that way and I've changed the bat so it checks all the js and html files under editor.

I've fixed all but one warning that it looked to me like a bug in the jslint engine.

comment:4 Changed 12 years ago by Frederico Caldeira Knabben

Resolution: fixed
Status: assignedclosed

Great! I've have made some changes on it, extending the checks to other directories, and making lint.bat accepting an optional parameter for a file name to output the check. Also, you will find lint_report.bat which automatically generates the report file (lint_report.txt).

I've tried to enable the "missing_semicolon" warnings. They are really useful, and actually I've fixed two missing semicolons at our code. But it seams that the "lambda_assign_requires_semicolon" is not always working, so I've disabled it again. I hope will find out a way to use it.

Now we have another powerful tool to guarantee our code quality. This is amazing. Thanks again.

Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy