Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 4 additions & 10 deletions linter.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,12 @@ class HtmlTidy(Linter):
"""Provides an interface to tidy."""

syntax = 'html'
executable = 'tidy'
version_args = '--version'
version_re = r'(?P<version>\d+\.\d+\.\d+)'
version_requirement = '>= 4.9'
regex = r'^line (?P<line>\d+) column (?P<col>\d+) - (?:(?P<error>Error)|(?P<warning>Warning)): (?P<message>.+)'
error_stream = util.STREAM_STDERR

def cmd(self):
"""Return a tuple with the command line to execute."""
command = [self.executable_path, '-errors', '-quiet', '-utf8']
if Linter.which('tidy5'):
command[0] = Linter.which('tidy5')
else:
command[0] = Linter.which('tidy')
return command
# Must return either a full path to a binary or an informal name
# of an executable.
executable = self.which('tidy5') or 'tidy'
return [executable, '-errors', '-quiet', '-utf8']