Bug 1429457 - [mozlint] Create formal 'setup' mechanism for bootstrapping lint dependencies, r=gbrown
This allows linters to define a 'setup' method which will automatically be called by |mach lint| before running the linter. Users can also explicitly run these methods (without doing any actual linting) by running |mach lint --setup|. MozReview-Commit-ID: 74aY1pfsaX1
This commit is contained in:
@@ -136,14 +136,14 @@ def run_process(config, cmd):
|
||||
proc.kill()
|
||||
|
||||
|
||||
def lint(paths, config, **lintargs):
|
||||
|
||||
def setup(root):
|
||||
if not reinstall_flake8():
|
||||
print(FLAKE8_INSTALL_ERROR)
|
||||
return 1
|
||||
|
||||
binary = get_flake8_binary()
|
||||
|
||||
def lint(paths, config, **lintargs):
|
||||
binary = get_flake8_binary()
|
||||
cmdargs = [
|
||||
binary,
|
||||
'--format', '{"path":"%(path)s","lineno":%(row)s,'
|
||||
|
||||
Reference in New Issue
Block a user