Move on Aptos IntelliJ Plugin Help

Code Analysis

With Intellij Move, you have two options for static code analysis: the built-in set of inspections and/or external linters.

Inspections

Inspections detect and help to correct anomalous code before you compile it. This includes various problems like potential bugs, spelling problems, or overall code structure issues.

By default, most of the Rust inspections work on-the-fly. Some also provide quick-fixes to be applied right away.

You can also run inspections on demand by calling Code | Inspect Code from the main menu. In this case, the results are shown in a separate window, from which you can apply quick-fixes to a single case or to several cases at a time.

External linters

In addition to the built-in set of inspections, Intellij Move helps you run Aptos Compiler without leaving the IDE.

Call Aptos Compiler

  1. Go to Settings | Language & Frameworks | Aptos | External Linters.

  2. Select the external linter (at the time only Aptos Compiler is supported) and provide additional arguments if required:

    External Linter Settings
  3. Set the Run external linter to analyze code on the fly checkbox if you prefer the chosen linter to work as you type.

    A widget in the status bar will also show the status of the on-the-fly analysis option. You can click it to quickly open the linters settings.

    External Linter Widget
  4. If you haven't set Run external linter to analyze code on the fly on the previous step, call the linter by clicking Run external linter in the Aptos tool window (View | Tool Windows | Aptos)

    External Linter Button
Last modified: 01 July 2024