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

sublimelint

by lunixbochs ALL Top 100

Error highlighting in Sublime Text.

Labels linting

Details

  • 2015.10.10.07.11.17
    2013.01.19.22.38.15
  • github.​com
  • 9 years ago
  • 11 minutes ago
  • 13 years ago

Installs

  • Total 249K
  • Win 143K
  • Mac 64K
  • Linux 42K
Jul 27 Jul 26 Jul 25 Jul 24 Jul 23 Jul 22 Jul 21 Jul 20 Jul 19 Jul 18 Jul 17 Jul 16 Jul 15 Jul 14 Jul 13 Jul 12 Jul 11 Jul 10 Jul 9 Jul 8 Jul 7 Jul 6 Jul 5 Jul 4 Jul 3 Jul 2 Jul 1 Jun 30 Jun 29 Jun 28 Jun 27 Jun 26 Jun 25 Jun 24 Jun 23 Jun 22 Jun 21 Jun 20 Jun 19 Jun 18 Jun 17 Jun 16 Jun 15 Jun 14 Jun 13 Jun 12
Windows 0 6 3 11 7 10 9 5 8 7 11 1 3 3 4 5 4 0 7 7 6 5 5 7 5 1 5 8 0 5 5 5 5 4 6 0 6 5 8 4 3 0 5 6 14 5
Mac 0 5 2 1 2 1 0 0 1 2 1 2 2 1 1 2 1 3 1 1 1 3 4 4 3 1 1 0 1 0 1 0 0 4 1 0 3 1 1 0 0 0 2 0 2 0
Linux 0 2 2 3 1 2 2 1 2 1 1 1 1 1 3 2 3 2 5 1 1 1 1 2 1 1 2 3 1 2 3 1 3 1 1 1 4 4 2 2 1 1 1 3 0 1

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"]
}