def lint(self, view_id): view = Linter.get_view(view_id) if view is not None: print 'SublimeLint: running on `%s`' % os.path.split(view.file_name() or 'untitled')[1] code = Linter.text(view) thread.start_new_thread(Linter.lint_view, (view_id, code, self.finish))
def lint(self, code=None): self.highlight = Highlight(code) self.errors = {} if code is None: code = Linter.text(self.view) if code: self.check(code)