Skip to content

Commit 91a82fa

Browse files
committed
Add linter script with command and expected regular expression
1 parent 199cd11 commit 91a82fa

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

linter.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import os
2+
import json
3+
import tempfile
4+
from SublimeLinter.lint import Linter, util
5+
from SublimeLinter.lint.persist import settings
6+
7+
8+
class Golangcilint(Linter):
9+
cmd = "golangci-lint run --fast --out-format json --enable typecheck"
10+
regex = r"(?:[^:]+):(?P<line>\d+):(?P<col>\d+):(?:(?P<warning>warning)|(?P<error>error)):(?P<message>.*)"
11+
defaults = {"selector": "source.go"}
12+
error_stream = util.STREAM_STDOUT
13+
multiline = False

0 commit comments

Comments
 (0)