diff --git a/linter.py b/linter.py index 5e884bb..2273cb4 100644 --- a/linter.py +++ b/linter.py @@ -18,18 +18,12 @@ class HtmlTidy(Linter): """Provides an interface to tidy.""" syntax = 'html' - executable = 'tidy' - version_args = '--version' - version_re = r'(?P\d+\.\d+\.\d+)' - version_requirement = '>= 4.9' regex = r'^line (?P\d+) column (?P\d+) - (?:(?PError)|(?PWarning)): (?P.+)' 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']