How to Lint a Single File in the DVT IDE for VS Code
Description
This video shows how Verissimo can quickly analyze only the current file when working in the DVT IDE, helping you catch issues as early as possible.
Transcript
In a typical development flow, it is desirable to regularly lint the files you are editing in order to catch issues as early as possible. When working in the DVT IDE, you can significantly cut down the linting time by analyzing only the current file. Let's take a look at how you can enable single file linting.
Enabling Single File Linting
From the command palette, run the Verissimo: Lint File
command. You can either pick an existing lint configuration or create a new one. Let's create a new one with the basic predefined rule set, use the default waivers file location, and call it Basic Lint.
Viewing Linting Results
The linting results are shown in the editor as problem markers on the left-hand side, and in the Problems view, alongside other compilation-related issues.
Reusing the Last Lint Configuration
Let's jump to another file and lint again, this time conveniently picking the last configuration used.
Mapping the Lint Command to a Keyboard Shortcut
For instant access, you can even map the command to a keyboard shortcut.
- Open the keyboard shortcut preferences.
- Locate the
Verissimo: Lint File with Last Configuration
command. - Press Enter to fill in the desired key combination.
- Press Enter again when done.
Using Verissimo Flows in File Linting Mode
All typical Verissimo flows are available when in file linting mode. Simply run the command again to reapply checks after modifying the code. You can also waive failures and even perform auto-correct.
Clearing Lint Results
When done, run the Verissimo: Clear Current File Results
command to clear the failure markers.