How to create rulesets using Verissimo Ruleset Editor
Overview
The set of rules applied by Verissimo in a linting session are specified in a ruleset XML file. This video focuses on creating a new ruleset using the Ruleset Editor. Learn how to add and organize rules into predefined or custom categories, customize rule attributes, and generate the ruleset XML file.
This video was made with DVT version 25.1.15.
Details
Introduction
The set of rules applied by Verissimo in a linting session are specified in a ruleset XML file.
You can easily create and maintain rulesets using the Verissimo Ruleset Editor.
Creating a new ruleset
Let’s create a new ruleset from scratch. First, we generate the Ruleset Editor using the command line.
The editor is in fact an HTML file which can also be generated from DVT IDE.
When opened, the Ruleset Editor is in Rule Select Mode, where you can browse all available Verissimo rules.
Adding rules under their predefined category
Use the filter to quickly find the rules you need.
Simply click Add to Ruleset to add the rule under its predefined category.
Adding rules under a custom category
Alternatively, you can Select one or more rules, click Add to Category, then Choose new category and fill in the category name.
Customizing the added rules
After adding all desired rules, switch to Rule Edit Mode.
Here, you can change the name, title, description and parameters for the selected rule.
Creating multiple rule instances
You can also Duplicate a rule and change its attribute values to create a new instance of the rule with a different configuration.
Removing rules
Of course, you can also Remove rules if needed.
Editing the ruleset XML generation preferences
The ruleset is now ready to be generated.
By default, only the modified rule attributes will be written to the XML.
What if you also want to include some of the defaults, for example the title and all parameters of the rules?
Click Generation Preferences.
Here you can specify which attributes to always include, or choose to add additional information about the rules or their parameters.
Generating the ruleset XML file
Finally, click Generate Ruleset and choose the location for the file.