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.

  1. Open the keyboard shortcut preferences.
  2. Locate the Verissimo: Lint File with Last Configuration command.
  3. Press Enter to fill in the desired key combination.
  4. 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.