Code Analysis (Validation)

Code Analysis and Validation in JetForcer

Content:

Offline Validation

The good news for Salesforce developers is that JetForcer provides source code analyzer for Apex,Lightning, Visualforceand other supported languages, which allows to save plenty of time that validation on server and subsequent error correction would normally take.

JetForcer detects errors on the fly, as code modified in the editor, and highlights them with curly underline (or with red font in some cases). The error description is shown when the mouse pointer is hovered on the error.

Offline validation doesn't limit user actions - deploy, retrieve and any other actions can be applied to a file with errors.

Inspections

The nice part about this feature is that inspections are highly customizable - they can be enabled or disabled, you can define scopes for them or code fragments where a certain one is suppressed, change each one's severity, create profiles with a custom set of inspections, etc.

Validate on Server

As an alternative to the Offline Validation you can validate your code on server.

The analysis can be invoked in several ways:

  • Select files or folders in the project view, then call context menu and choose Validate Selected ....

  • Call the same action from the editor context menu or Salesforce menu to validate the file opened in the editor.

JetForcer reports validation results in the Salesforce tool window. All the errors and warnings are listed with file name and row and column numbers specifying where the problem is. You can also navigate from the error description to the actual problem location in the source code.