Ejemplo n.º 1
0
    def lint(self, view_id):
        view = Linter.get_view(view_id)

        sections = {}
        for sel, _ in Linter.get_selectors(view_id):
            sections[sel] = []
            for result in view.find_by_selector(sel):
                sections[sel].append((view.rowcol(result.a)[0], result.a, result.b))

        if view is not None:
            filename = view.file_name()
            persist.debug("SublimeLint: running on `%s`" % os.path.split(filename or "untitled")[1])
            code = Linter.text(view)
            thread.start_new_thread(Linter.lint_view, (view_id, filename, code, sections, self.finish))
Ejemplo n.º 2
0
	def lint(self, view_id):
		view = Linter.get_view(view_id)

		sections = {}
		for sel, _ in Linter.get_selectors(view_id):
			sections[sel] = []
			for result in view.find_by_selector(sel):
				sections[sel].append(
					(view.rowcol(result.a)[0], result.a, result.b)
				)

		if view is not None:
			filename = view.file_name()
			code = Linter.text(view)
			thread.start_new_thread(Linter.lint_view, (view_id, filename, code, sections, self.finish))
Ejemplo n.º 3
0
    def lint(self, view_id):
        view = Linter.get_view(view_id)

        sections = {}
        for sel, _ in Linter.get_selectors(view_id):
            sections[sel] = []
            for result in view.find_by_selector(sel):
                sections[sel].append(
                    (view.rowcol(result.a)[0], result.a, result.b))

        if view is not None:
            filename = view.file_name()
            code = Linter.text(view)
            thread.start_new_thread(
                Linter.lint_view,
                (view_id, filename, code, sections, self.finish))
	def lint(self, view_id):
		view = Linter.get_view(view_id)

		sections = {}
		for sel, _ in Linter.get_selectors(view_id):
			sections[sel] = []
			for result in view.find_by_selector(sel):
				sections[sel].append(
					(view.rowcol(result.a)[0], result.a, result.b)
				)

		if view is not None:
			filename = view.file_name()
			persist.debug('SublimeLint: running on `%s`' % os.path.split(filename or 'untitled')[1])
			code = Linter.text(view)
			thread.start_new_thread(Linter.lint_view, (view_id, filename, code, sections, self.finish))