Address feedback

This commit is contained in:
Andy Armstrong
2017-09-12 15:28:12 -04:00
parent 3bb6316620
commit 8de47f247c
2 changed files with 6 additions and 10 deletions

View File

@@ -9,13 +9,13 @@ from paver.easy import BuildFailure
import pavelib.quality
class TestPaverStylelint(unittest.TestCase):
class TestPaverESLint(unittest.TestCase):
"""
For testing run_stylelint
For testing run_eslint
"""
def setUp(self):
super(TestPaverStylelint, self).setUp()
super(TestPaverESLint, self).setUp()
# Mock the paver @needs decorator
self._mock_paver_needs = patch.object(pavelib.quality.run_eslint, 'needs').start()

View File

@@ -335,11 +335,11 @@ def _get_stylelint_violations():
)
try:
return int(_get_count_from_last_line(stylelint_report, "eslint"))
return int(_get_count_from_last_line(stylelint_report, "stylelint"))
except TypeError:
raise BuildFailure(
"Error. Number of eslint violations could not be found in {eslint_report}".format(
eslint_report=stylelint_report
"Error. Number of stylelint violations could not be found in {stylelint_report}".format(
stylelint_report=stylelint_report
)
)
@@ -369,10 +369,6 @@ def run_stylelint(options):
violations_limit=violations_limit,
)
)
if num_violations > 0:
print("Stylelint succeeded with no more violations than {violations_limit}".format(
violations_limit=violations_limit,
))
@task