jslint4java
jslint4java copied to clipboard
Timestamp skip: optional feature to skip unmodified source files to speed up builds
When doing several maven runs, processing several JS files that haven't been modified is quite slow. With this fork, setting the optional parameter checkFileModificationTimes=true means that maven will skip checking files that haven't been modified on the previous builds. Features:
- 'mvn clean' will ensure all of them are checked on the next run, handy for CI builds
- skipped files are not present on the reports
- added or removed files between builds should be taken into account automagically
- all tests pass and new tests have been added to account for new functionality
- no API changes are needed and class structure is pretty much as it was before
- optionality means existing POM files are not broken and that this optimized behavior is an opt-in feature
- report formats are unchanged
Caveats:
- files with issues that haven't been modified will be skipped
Please let me know if you think this is useful and if there are any required tweaks, thanks.
First commit shows some old code on one of the files (tried a crappy scheme for the timestamps report) but it should be OK if you take all commits.
dani:jslint4java-maven-plugin/ (timestamp-skip) $ git status [1:33:27]
# On branch timestamp-skip
nothing to commit (working directory clean)
dani:jslint4java-maven-plugin/ (timestamp-skip) $ mvn -Pdist clean verify install -q [1:48:54]
[debug] execute contextualize
[debug] execute contextualize
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running com.googlecode.jslint4java.maven.FileListerTest
Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.216 sec
Running com.googlecode.jslint4java.maven.FileTimestampExcludeListerTest
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.043 sec
Running com.googlecode.jslint4java.maven.JSLintMojoTest
Tests run: 14, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 5.797 sec
Running com.googlecode.jslint4java.maven.MultiReportWriterTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.006 sec
Running com.googlecode.jslint4java.maven.ReportWriterImplTest
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.009 sec
Running com.googlecode.jslint4java.maven.TimestampFormatterTest
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec
Results :
Tests run: 32, Failures: 0, Errors: 0, Skipped: 0
[debug] execute contextualize
[debug] execute contextualize
dani:jslint4java-maven-plugin/ (timestamp-skip) $