Skip to content
This repository was archived by the owner on Dec 8, 2020. It is now read-only.

Latest commit

 

History

History
29 lines (17 loc) · 775 Bytes

linting.md

File metadata and controls

29 lines (17 loc) · 775 Bytes

Linting In Legacy Mode

Executing a cargo command makes the extension parse the the command's output and show diagnostics.

Legacy Mode cannot show diagnostics as you type, for that you should use RLS Mode.

Let's assume we have the following code:

fn main() {
    let x = 5 + "10";
}

We then execute any cargo command. Let's execute "Cargo: Build".

It builds and shows diagnostics:

  • In the source code:

Linting

  • And In the Problems panel:

Linting

We can hover over any diagnostic to see what it is:

Linting