• Stars
    star
    2,005
  • Rank 22,936 (Top 0.5 %)
  • Language
    Python
  • License
    MIT License
  • Created almost 11 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The code linting framework for Sublime Text

SublimeLinter

tests

The code linting framework for Sublime Text. No linters included: get them via Package Control.

Installation

Install SublimeLinter and linters via Package Control.

Settings

Settings are documented in the default settings. Open the settings using the Command Palette (ctrl+shift+P) searching for Preferences: SublimeLinter Settings (mnemonic: sls).

When you open the SublimeLinter settings you'll see the defaults on the left or top. Usually that's all that is needed for end-users but some additional information is in our docs at sublimelinter.com.

Quick Actions/Fixers

As we do just linting SublimeLinter naturally does not come with fixers and/or code formatters. However, we have a fixer API and ship (mostly) "fix by ignoring" actions. These allow you to quickly ignore specific error messages inline and ad hoc.[1]

SublimeLinter currently ships actions for eslint, stylelint, flake8, mypy, shellcheck, codespell and phpcs.

Want to see actions for your favourite linter? Please open a PR with your addition to quick_fix.py. We have tests for them!

[1] Why this limitation though? Well it is usually easy to add a semicolon here and a space there, but the inline ignore rules and syntaxes are very cumbersome to type and to remember. And there is basically no project of any size where you don't have to ignore ad-hoc something somewhere once.

Key Bindings

SublimeLinter comes with some pre-defined keyboard shortcuts. You can customize these via the Package Settings menu.

Command Linux & Windows MacOS
Lint this view CTRL + K, L CTRL + CMD + L
Open diagnostics panel CTRL + K, A CTRL + CMD + A
Goto next error CTRL + K, N CTRL + CMD + E
Goto prev error CTRL + K, P CTRL + CMD + SHIFT + E

Take also a look at the default bindings because we document other commands and have usually some tricks in there too.

For example, it is very advisable to bind sublime_linter_quick_actions, e.g.

    // To trigger a quick action
    // { "keys": ["ctrl+k", "ctrl+f"],
    //   "command": "sublime_linter_quick_actions"
    // },

Support & Bugs

Yeah, totally! Often if it doesn't work, Sublime will have something in the console (View -> Show Console). Enable debug mode in the settings, restart Sublime Text and look at the console output for anything.

If your issue is specific to a particular linter, please report it on that linter's repository, otherwise open it right here.

Creating a linter plugin

Fork the template to get started on your plugin. It contains a howto with all the information you need. Of course, take a look at a similar linter plugin and let it inspire you.

Also Support

β€οΈπŸ˜’ Donate πŸ™„

More Repositories

1

SublimeLinter-eslint

This linter plugin for SublimeLinter provides an interface to ESLint
Python
866
star
2

SublimeLinter-jshint

SublimeLinter plugin for JavaScript, using jshint.
Python
460
star
3

SublimeLinter-shellcheck

This linter plugin for SublimeLinter provides an interface to shellcheck.
Python
209
star
4

SublimeLinter-php

SublimeLinter 3 plugin for PHP, using php -l.
Python
209
star
5

SublimeLinter-jscs

Deprecated SublimeLinter 3 plugin for jscs
Python
200
star
6

SublimeLinter-flake8

SublimeLinter plugin for python, using flake8.
Python
182
star
7

SublimeLinter-csslint

SublimeLinter plugin for CSS, using csslint.
Python
172
star
8

SublimeLinter-rubocop

SublimeLinter 3 plugin for Ruby, using rubocop.
Python
159
star
9

SublimeLinter-html-tidy

SublimeLinter 3 plugin for html tidy.
Python
127
star
10

SublimeLinter-flow

SublimeLinter plugin for JavaScript static type checking, using flow.
Python
117
star
11

SublimeLinter-jsxhint

Deprecated SublimeLinter 3 plugin for JSX - use ESLint instead
Python
117
star
12

SublimeLinter-pylint

SublimeLinter plugin for python, using pylint.
Python
116
star
13

SublimeLinter-pep8

Deprecated SublimeLinter plugin for pep8, use pycodestyle instead
Python
107
star
14

SublimeLinter-annotations

SublimeLinter plugin that marks annotations such as TODO, FIXME, etc.
Python
106
star
15

SublimeLinter-json

SublimeLinter plugin for JSON.
Python
83
star
16

SublimeLinter-phplint

SublimeLinter plugin for PHP, using phplint.
Python
73
star
17

SublimeLinter-tslint

tslint plugin for SublimeLinter. Lint your typescript code.
Python
72
star
18

SublimeLinter-phpcs

SublimeLinter plugin for PHP, using phpcs.
Python
70
star
19

SublimeLinter-ruby

SublimeLinter plugin for ruby, using ruby -wc.
Python
60
star
20

SublimeLinter-mypy

mypy static type checking for python
Python
54
star
21

SublimeLinter-pycodestyle

SublimeLinter plugin for python, using pycodestyle.
Python
44
star
22

SublimeLinter-pyflakes

SublimeLinter plugin for python, using pyflakes.
Python
43
star
23

SublimeLinter-javac

SublimeLinter 3 plugin for Java, using javac -Xlint.
Python
41
star
24

SublimeLinter-coffeelint

SublimeLinter plugin for CoffeeScript, using coffeelint.
Python
38
star
25

SublimeLinter-stylelint

This linter plugin for SublimeLinter provides an interface to stylelint.
Python
32
star
26

SublimeLinter-golangcilint

This linter plugin for SublimeLinter provides an interface to golangci-lint.
Python
31
star
27

SublimeLinter-xmllint

SublimeLinter 3 plugin for XML, using xmllint.
Python
29
star
28

SublimeLinter-luacheck

SublimeLinter 3 plugin for lua, using luacheck
Python
27
star
29

SublimeLinter-cppcheck

This linter plugin for SublimeLinter provides an interface to cppcheck.
Python
27
star
30

package_control_channel

Private channel for Package Control
Python
24
star
31

SublimeLinter-golint

This linter plugin for SublimeLinter provides an interface to golint.
Python
23
star
32

SublimeLinter-clang

SublimeLinter plugin for C/C++, using clang
Python
23
star
33

SublimeLinter-pug-lint

SublimeLinter plugin for Pug (formerly Jade), using pug-lint
Python
23
star
34

SublimeLinter-chktex

LaTeX linter plugin for SublimeLinter 3, using chktex.
Python
22
star
35

SublimeLinter-gcc

This linter plugin for SublimeLinter provides an interface to gcc or other gcc-like (cross-)compiler.
Python
22
star
36

SublimeLinter-cpplint

This linter plugin for SublimeLinter provides an interface to cpplint.
Python
21
star
37

SublimeLinter-lua

SublimeLinter 3 plugin for Lua, using luac -p.
Python
20
star
38

SublimeLinter-coffee

SublimeLinter plugin for CoffeeScript, using coffee --compile.
Python
20
star
39

SublimeLinter-gotype

This linter plugin for SublimeLinter provides an interface to gotype.
Python
20
star
40

SublimeLinter-govet

This linter plugin for SublimeLinter provides an interface to go vet.
Python
18
star
41

SublimeLinter-template

A template for new linter plugins
Python
16
star
42

SublimeLinter-phpmd

SublimeLinter plugin for php, using phpmd.
Python
15
star
43

SublimeLinter-haml

SublimeLinter 3 plugin for Haml, using haml -c.
Python
14
star
44

SublimeLinter-gjslint

SublimeLinter plugin for JavaScript, using gjslint.
Python
14
star
45

SublimeLinter-pyyaml

Deprecated plugin for SublimeLinter for pyyaml. Use yamllint instead.
Python
14
star
46

SublimeLinter-bandit

SublimeLinter plugin for Python, using bandit
Python
12
star
47

SublimeLinter-pydocstyle

SublimeLinter plugin for python, using pydocstyle.
Python
10
star
48

SublimeLinter-rst

Deprecated SublimeLinter plugin for reStructuredText, using docutils.
Python
9
star
49

SublimeLinter-ghc

SublimeLinter 3 plugin for Haskell, using ghc -Wall.
Python
8
star
50

SublimeLinter-hlint

SublimeLinter plugin for hlint.
Python
8
star
51

SublimeLinter-jsl

SublimeLinter plugin for JavaScript, using JavaScript Linter (jsl).
Python
7
star
52

SublimeLinter-mdl

This linter plugin for SublimeLinter provides an interface to Markdown Lint Tool (mdl)
Python
7
star
53

SublimeLinter-haml-lint

SublimeLinter 3 plugin for Haml, using haml-lint.
Python
4
star
54

SublimeLinter-erlc

SublimeLinter plugin for Erlang, using erlc
Python
3
star
55

SublimeLinter-rome

SublimeLinter plugin to provide an interface to Rome
Python
2
star
56

SublimeLinter-vale

Plugin for SublimeLinter to provide an interface to Vale
Python
1
star
57

SublimeLinter-raml-cop

SublimeLinter plugin for RAML, using raml-cop.
Python
1
star