Skip to content

Commit b10119d

Browse files
committed
Override SublimeLinter.run method to process in the background
1 parent 91a82fa commit b10119d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

linter.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,13 @@ class Golangcilint(Linter):
1111
defaults = {"selector": "source.go"}
1212
error_stream = util.STREAM_STDOUT
1313
multiline = False
14+
15+
def run(self, cmd, code):
16+
dir = os.path.dirname(self.filename)
17+
if not dir:
18+
print("golangcilint: skipped linting of unsaved file")
19+
return
20+
if settings.get("lint_mode") == "background":
21+
return self._live_lint(cmd, code)
22+
else:
23+
return self._in_place_lint(cmd)

0 commit comments

Comments
 (0)