How to lint incrementally with Verissimo in DVT Eclipse IDE
Overview
DVT IDE speeds up fixing Verissimo failures with advanced editing, navigation and debugging capabilities while incremental compilation enables you to quickly iterate through the fixing process.
This video focuses on setting up Verissimo in DVT to incrementally analyze your changes and report failures on the fly.
This video was made using version 25.1.7 of the DVT IDE.
Details
Working with Verissimo in DVT
Fixing Verissimo failures is easier and faster within the DVT IDE, compared with using a plain text editor and re-running the linter in batch mode. You benefit from all the advanced code editing, debugging, navigation and visualization capabilities of the IDE while fixing the failures. DVT's incremental compiler updates the project database as you type. You can rerun linting on demand - either only the failed checks or all of them to make sure no other rules have been violated.
Incremental Linting setup
You can further streamline this process by using the Incremental Linting features provided by Verissimo in DVT. This way, as you work on your project, Verissimo automatically analyzes your changes and reports linting errors on the fly.
In terms of setup, you just need to specify in the build configuration file if you want to run the linting after an incremental build, full project build or both. Let's set-up the linting to run incrementally, specify the ruleset and waivers file and rebuild the project.
Fixing failures incrementally in DVT IDE
First, let’s fix this $cast failure by assigning the returned value to a variable and printing an error message.
Since this field is not declared, DVT immediately flags a compile error, but it can be easily fixed using the DVT Quick Fix.
Now, Verissmo runs incrementally and triggers a failure because this new field does not follow the naming convention for class members. Again, DVT IDE functionality allows you to quickly perform a refactoring operation and rename it accordingly. Similar to incremental compilation in DVT, Verissimo only analyzes the code affected by your changes and the failure is instantly cleared.
By the way, DVT also brings Verissimo auto-correct at the tip of your fingers, so you can quickly fix auto-correctable failures.