Commit a0cc1d53 authored by Dom Sekotill's avatar Dom Sekotill
Browse files

Remove --fail-under in favour of Pylint's own option

Pylint's --fail-under option is identical; so… why not?
parent 06d51fac
Loading
Loading
Loading
Loading
+2 −14
Original line number Diff line number Diff line
@@ -26,21 +26,13 @@ __version__ = '0.3'
	multiple=True,
	help="The names of optional requirements sets to install",
)
@click.option(
	'--fail-under', '-f',
	default=10.0,
	type=float,
	help="""
	If the score is below the given threshold a non-zero exit code will be returned
	""",
)
@click.option(
	'--editable/--non-editable',
	default=isfile('setup.py'),
	help="Use the editable install (develop) feature provided by setuptools",
)
@click.argument('pylint-options', nargs=-1, type=click.UNPROCESSED)
def main(extras, fail_under, editable, pylint_options):
def main(extras, editable, pylint_options):
	"""Invoke Pylint on the given files after ensuring dependencies are up to date"""
	join = ','.join
	cmd = ['pip', 'install', '--upgrade']
@@ -61,11 +53,7 @@ def main(extras, fail_under, editable, pylint_options):
		sys.stderr.write(exc.stderr)
		sys.exit(3)

	run = lint.Run(list(pylint_options), do_exit=False)
	score = run.linter.stats['global_note']

	if score < fail_under:
		sys.exit(1)
	lint.Run(list(pylint_options))


if __name__ == '__main__':