Make `check_syntax` a function
@@ -103,7 +103,7 @@ class Listener:
if not util.is_lintable(view):
return
- if self.check_syntax(view):
+ if check_syntax(view):
lint_mode = persist.settings.get('lint_mode')
if lint_mode in ('background', 'load_save'):
self.hit(view)
@@ -174,7 +174,7 @@ class SublimeLinter(sublime_plugin.EventListener, Listener):
return
vid = view.id()
- self.check_syntax(view)
+ check_syntax(view)
if vid in persist.view_linters:
view_has_changed = make_view_has_changed_fn(view)
@@ -217,7 +217,8 @@ class SublimeLinter(sublime_plugin.EventListener, Listener):
'errors': errors
})
- def check_syntax(self, view):
+
+def check_syntax(view):
"""
Check and return if view's syntax has changed.
