Backed out changeset 393b0727cba4 (bug 1387830) for flake8 failures a=backout
authorWes Kocher <wkocher@mozilla.com>
Tue, 08 Aug 2017 09:19:39 -0700
changeset 373413 96f8096db6320a178dd3d6f44ae31385c92b8f28
parent 373412 309b1b63eb48ded8573cafdcc21602765fce3d9e
child 373414 3e13ecea8235e6d356843e868e40e8098649e5bc
push id48260
push userkwierso@gmail.com
push dateTue, 08 Aug 2017 16:19:48 +0000
treeherderautoland@96f8096db632 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1387830
milestone57.0a1
backs out393b0727cba49affa7aec2a84024dfdbf4a5ff10
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset 393b0727cba4 (bug 1387830) for flake8 failures a=backout MozReview-Commit-ID: IOTenjMeVmt
python/mozlint/mozlint/cli.py
--- a/python/mozlint/mozlint/cli.py
+++ b/python/mozlint/mozlint/cli.py
@@ -22,22 +22,16 @@ class MozlintParser(ArgumentParser):
           }],
         [['-l', '--linter'],
          {'dest': 'linters',
           'default': [],
           'action': 'append',
           'help': "Linters to run, e.g 'eslint'. By default all linters "
                   "are run for all the appropriate files.",
           }],
-        [['--list'],
-          {'dest': 'list_linters',
-          'default': False,
-          'action': 'store_true',
-          'help': "List all available linters and exit.",
-          }],
         [['-f', '--format'],
          {'dest': 'fmt',
           'default': 'stylish',
           'help': "Formatter to use. Defaults to 'stylish'.",
           }],
         [['-n', '--no-filter'],
          {'dest': 'use_filters',
           'default': True,
@@ -108,25 +102,19 @@ def find_linters(linters=None):
 
             if linters and name not in linters:
                 continue
 
             lints.append(os.path.join(search_path, f))
     return lints
 
 
-def run(paths, linters, fmt, outgoing, workdir, list_linters=None, **lintargs):
+def run(paths, linters, fmt, outgoing, workdir, **lintargs):
     from mozlint import LintRoller, formatters
 
-    if list_linters:
-        lint_paths = find_linters(linters)
-        print("Available linters: {}".format(
-            [os.path.splitext(os.path.basename(l))[0] for l in lint_paths]
-        ))
-        return 0
     lint = LintRoller(**lintargs)
     lint.read(find_linters(linters))
 
     # run all linters
     results = lint.roll(paths, outgoing=outgoing, workdir=workdir)
     formatter = formatters.get(fmt)
 
     # Encode output with 'replace' to avoid UnicodeEncodeErrors on