ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

sublimelint

by lunixbochs ALL Trending Top 100

Error highlighting in Sublime Text.

Labels linting

Details

  • 2015.10.10.07.11.17
    2013.01.19.22.38.15
  • github.​com
  • 5 years ago
  • 3 hours ago
  • 9 years ago

Installs

  • Total 225K
  • Win 127K
  • Mac 60K
  • Linux 38K
Sep 29 Sep 28 Sep 27 Sep 26 Sep 25 Sep 24 Sep 23 Sep 22 Sep 21 Sep 20 Sep 19 Sep 18 Sep 17 Sep 16 Sep 15 Sep 14 Sep 13 Sep 12 Sep 11 Sep 10 Sep 9 Sep 8 Sep 7 Sep 6 Sep 5 Sep 4 Sep 3 Sep 2 Sep 1 Aug 31 Aug 30 Aug 29 Aug 28 Aug 27 Aug 26 Aug 25 Aug 24 Aug 23 Aug 22 Aug 21 Aug 20 Aug 19 Aug 18 Aug 17 Aug 16 Aug 15
Windows 22 30 24 26 27 26 23 25 26 13 14 32 26 26 29 18 16 19 25 32 33 20 35 18 18 28 24 29 25 34 25 20 28 21 20 26 29 20 12 20 17 21 21 23 21 12
Mac 5 8 4 4 5 5 11 3 9 7 5 4 5 4 6 8 5 7 4 6 5 7 3 2 3 7 6 5 8 6 3 3 8 5 11 2 3 5 5 5 6 4 1 6 6 1
Linux 4 7 7 3 6 6 6 3 8 2 8 5 6 8 7 6 7 4 11 4 8 10 4 5 4 5 6 7 4 6 5 6 5 6 5 8 7 3 6 11 8 9 10 8 7 5

Readme

Source
raw.​githubusercontent.​com

Sublime Lint

A framework for error highlighting in the Sublime Text editor.

It's easy to add language support. Take a look at the linter repository for examples.

Linters in your Sublime Text User/linters folder will be automatically used. Changes to linters in this folder will be overwritten on automatic update. If you want to change a builtin linter, disable it in the Sublime Lint preferences and copy the source to a new file/class name.

You can also import Linter and subclass it inside plugin_loaded() from any other Sublime plugin.

Installation

You can install in ST3 by adding this repository to Package Control, which does automatic updates.

Alternatively, you can clone sublimelint into your Packages folder and switch to the st3 branch manually, but you will need to update manually.

Usage

Make sure you have the necessary command installed to lint your language - there's a list in the linter repository README.

It will lint as you edit any file in a supported language. Check the status bar for messages, and take a look at the SublimeLint commands in the Command Palette.

There's a current bug that makes it sometimes take a few seconds to start linting upon an editor restart. Be patient.

Command Palette

Press cmd+shift+p on OS X, ctrl+shift+p for everyone else. Type sublimelint to see the available commands:

  • Next Error - Jump to the next highlighed error or warning in your code.
  • Previous Error - Jump to the previous error.
  • Show All Errors - Open a command panel listing all errors in the current file.
  • Report (Open Files) - Lint all open files and show a report in a new view.
  • Preferences: SublimeLint Settings - User - Change global and linter settings.

Settings

You can change a few useful per-language settings by opening “SublimeLint Settings - User” via the Command Palette. Some languages (like C and C++) have additional linter-specific settings.

Example language settings:

"Ruby": {
    // This command is run against your code.
    // Some linters use a temporary file, while others pipe code to stdin.
    "cmd": ["ruby", "-wc"],
    // Disable the linter.
    "disable": false,
    // Exclude file patterns from being linted.
    "excludes": ["Rakefile", "*.blah"]
}