Skip to content
guillermooo edited this page Oct 3, 2014 · 8 revisions

Using the Linter

Getting Started

The code linter is deactivated by default. To activate this feature you must set the dart_linter_active setting to true.

{
  "dart_linter_active" : true
}

Always edit your Dart plugin settings in Packages/User/Dart - Plugin Settings.sublime-settings.

To open this file, you can use the command palette (Ctrl++P), then select Preferences: Settings - User.

Configuration

The linter will run when Dart scripts are loaded or saved. You can change this behavior through the dart_linter_on_load and dart_linter_on_save settings.

Customizing Highlight Colors

Use the following settings:

  • dart_linter_underline_color_error
  • dart_linter_underline_color_warning
  • dart_linter_underline_color_info

To customize gutter icons:

  • dart_linter_gutter_icon_error
  • dart_linter_gutter_icon_warning
  • dart_linter_gutter_icon_info

Note: Paths to icons must start at the Packages directory.

{
  "dart_linter_gutter_icon_error" : "Packages/Users/Icons/error.png"
}

Linter Popup Configuration

Use dart_linter_show_popup_level setting to control when the pop up should show. Valid values are:

  • ERROR
  • WARNING
  • INFO
Clone this wiki locally