コード例 #1
0
ファイル: __init__.py プロジェクト: k-fish/lint-review
def requires_image(image):
    """Decorator for checking docker image existance.
    Image existence is cached on first check.
    """
    if image not in _images:
        _images[image] = docker.image_exists(image)

    return skipIf(not(_images[image]), u'requires the {} image'.format(image))
コード例 #2
0
ファイル: __init__.py プロジェクト: markstory/lint-review
def requires_image(image):
    """Decorator for checking docker image existence.

    Image existence is cached on first check.
    """
    if image not in _images:
        _images[image] = docker.image_exists(image)

    return skipIf(not(_images[image]), u'requires the {} image'.format(image))
コード例 #3
0
    def test_execute__install_plugins_cleanup_image_on_failure(self):
        custom_dir = root_dir + '/tests/fixtures/eslint_custom'
        tool = Eslint(self.problems, {
            'config': 'invalid.json',
            'install_plugins': True,
            'fixer': True
        }, custom_dir)
        target = 'has_errors.js'
        tool.process_files([target])

        problems = self.problems.all()
        eq_(1, len(problems))
        assert_in('Cannot find module', problems[0].body)

        ok_(docker.image_exists('nodejs'), 'original image is present')
        assert_not_in('eslint', docker.images(), 'no eslint image remains')
コード例 #4
0
    def test_execute__install_plugins(self):
        custom_dir = root_dir + '/tests/fixtures/eslint_custom'
        tool = Eslint(self.problems, {
            'config': 'config.json',
            'install_plugins': True,
            'fixer': True
        }, custom_dir)
        target = 'has_errors.js'
        tool.process_files([target])

        problems = self.problems.all()
        eq_(2, len(problems), 'Should find errors')
        assert_in('Unexpected var', problems[0].body)

        ok_(docker.image_exists('nodejs'), 'original image is present')
        assert_not_in('eslint', docker.images(), 'no eslint image remains')
コード例 #5
0
ファイル: test_eslint.py プロジェクト: markstory/lint-review
    def test_execute__install_plugins_cleanup_image_on_failure(self):
        custom_dir = root_dir + '/tests/fixtures/eslint_custom'
        tool = Eslint(self.problems, {
            'config': 'invalid.json',
            'install_plugins': True,
            'fixer': True
        }, custom_dir)
        target = 'has_errors.js'
        tool.process_files([target])

        problems = self.problems.all()
        self.assertEqual(1, len(problems))
        self.assertIn('Cannot find module', problems[0].body)

        self.assertTrue(docker.image_exists('eslint'),
                        'original image is present')
        for image in docker.images():
            self.assertNotIn('eslint-', image, 'no eslint image remains')
コード例 #6
0
    def test_execute__install_plugins_cleanup_image_on_failure(self):
        custom_dir = root_dir + '/tests/fixtures/eslint_custom'
        tool = Eslint(self.problems, {
            'config': 'invalid.json',
            'install_plugins': True,
            'fixer': True
        }, custom_dir)
        target = 'has_errors.js'
        tool.process_files([target])

        problems = self.problems.all()
        self.assertEqual(1, len(problems))
        self.assertIn('invalid-rules', problems[0].body)
        self.assertIn('output the following error', problems[0].body)

        self.assertTrue(docker.image_exists('eslint'),
                        'original image is present')
        for image in docker.images():
            self.assertNotIn('eslint-', image, 'no eslint image remains')
コード例 #7
0
ファイル: test_eslint.py プロジェクト: markstory/lint-review
    def test_execute__install_plugins(self):
        custom_dir = root_dir + '/tests/fixtures/eslint_custom'
        tool = Eslint(self.problems, {
            'config': 'config.json',
            'install_plugins': True,
            'fixer': True
        }, custom_dir)
        target = 'has_errors.js'
        tool.process_files([target])

        problems = self.problems.all()
        self.assertEqual(2, len(problems), 'Should find errors')
        self.assertIn('Unexpected var', problems[0].body)

        self.assertTrue(docker.image_exists('nodejs'),
                        'original image is present')

        for image in docker.images():
            self.assertNotIn('eslint-', image, 'no eslint image remains')
コード例 #8
0
ファイル: test_docker.py プロジェクト: jpos15/lint-review
 def test_image_exists__no_exist(self):
     self.assertFalse(docker.image_exists('nevergonnaexist:tacos'))
コード例 #9
0
ファイル: goodcheck.py プロジェクト: sallynsarah/lint-review
 def check_dependencies(self):
     """
     See if ruby image exists
     """
     return docker.image_exists('ruby2')
コード例 #10
0
ファイル: gpg.py プロジェクト: markstory/lint-review
 def check_dependencies(self):
     """
     See if the gpg image exists
     """
     return docker.image_exists('gpg')
コード例 #11
0
ファイル: gpg.py プロジェクト: jpos15/lint-review
 def check_dependencies(self):
     """
     See if the gpg image exists
     """
     return docker.image_exists('gpg')
コード例 #12
0
ファイル: eslint.py プロジェクト: markstory/lint-review
 def check_dependencies(self):
     """See if the nodejs image exists
     """
     return docker.image_exists('nodejs')
コード例 #13
0
ファイル: jsonlint.py プロジェクト: markstory/lint-review
 def check_dependencies(self):
     """
     See if the python2 image exists
     """
     return docker.image_exists('python2')
コード例 #14
0
ファイル: py3k.py プロジェクト: markstory/lint-review
 def check_dependencies(self):
     """
     See if python image is available
     """
     return docker.image_exists('python2')
コード例 #15
0
ファイル: flake8.py プロジェクト: josemanimala/lint-review
 def check_dependencies(self):
     """
     See if python2 or python3 image exists
     """
     return docker.image_exists('python2') or docker.image_exists('python3')
コード例 #16
0
 def check_dependencies(self):
     """
     See if python2 container exists
     """
     return docker.image_exists('python2')
コード例 #17
0
ファイル: stylelint.py プロジェクト: markstory/lint-review
 def check_dependencies(self):
     """
     See if nodejs container exists
     """
     return docker.image_exists('nodejs')
コード例 #18
0
ファイル: puppet.py プロジェクト: markstory/lint-review
 def check_dependencies(self):
     """
     See if ruby image exists
     """
     return docker.image_exists('ruby2')
コード例 #19
0
 def check_dependencies(self):
     return docker.image_exists('nodejs')
コード例 #20
0
ファイル: test_docker.py プロジェクト: markstory/lint-review
 def test_image_exists__no_exist(self):
     self.assertFalse(docker.image_exists('nevergonnaexist:tacos'))
コード例 #21
0
 def check_dependencies(self):
     """See if the nodejs image exists
     """
     return docker.image_exists('eslint')
コード例 #22
0
ファイル: swiftlint.py プロジェクト: markstory/lint-review
 def check_dependencies(self):
     """
     See if swiftlint is on the system path.
     """
     return docker.image_exists('swiftlint')
コード例 #23
0
 def check_dependencies(self):
     """
     See if standard is on the system path.
     """
     return docker.image_exists('nodejs')
コード例 #24
0
ファイル: credo.py プロジェクト: markstory/lint-review
 def check_dependencies(self):
     """
     See if credo image exists
     """
     return docker.image_exists('credo')
コード例 #25
0
ファイル: foodcritic.py プロジェクト: markstory/lint-review
 def check_dependencies(self):
     """
     See if foodcritic is on the PATH
     """
     return docker.image_exists('ruby2')
コード例 #26
0
 def check_dependencies(self):
     """
     See if foodcritic is on the PATH
     """
     return docker.image_exists('ruby2')
コード例 #27
0
ファイル: yamllint.py プロジェクト: jpos15/lint-review
 def check_dependencies(self):
     """
     See if python2 image is installed
     """
     return docker.image_exists('python2')
コード例 #28
0
 def check_dependencies(self):
     """
     See if golint image exists
     """
     return docker.image_exists('golint')
コード例 #29
0
ファイル: tslint.py プロジェクト: tedmdelacruz/lint-review
 def check_dependencies(self):
     """
     See if nodejs image exists
     """
     return docker.image_exists('nodejs')
コード例 #30
0
 def check_dependencies(self):
     """
     See if python image is available
     """
     return docker.image_exists('python2')
コード例 #31
0
ファイル: checkstyle.py プロジェクト: markstory/lint-review
 def check_dependencies(self):
     """
     See if checkstyle image exists
     """
     return docker.image_exists('checkstyle')
コード例 #32
0
ファイル: phpcs.py プロジェクト: victorvianna/lint-review
 def check_dependencies(self):
     """
     See if PHPCS is on the system path.
     """
     return docker.image_exists('phpcs')
コード例 #33
0
 def check_dependencies(self):
     """
     See if luacheck image exists
     """
     return docker.image_exists('luacheck')
コード例 #34
0
ファイル: credo.py プロジェクト: proteusvacuum/lint-review
 def check_dependencies(self):
     """
     See if credo image exists
     """
     return docker.image_exists('credo')
コード例 #35
0
 def check_dependencies(self):
     return docker.image_exists('credo')
コード例 #36
0
 def check_dependencies(self):
     """
     See if checkstyle image exists
     """
     return docker.image_exists('checkstyle')
コード例 #37
0
ファイル: yamllint.py プロジェクト: markstory/lint-review
 def check_dependencies(self):
     """
     See if python2 image is installed
     """
     return docker.image_exists('python2')
コード例 #38
0
ファイル: phpmd.py プロジェクト: jpos15/lint-review
 def check_dependencies(self):
     """
     See if the php container exists
     """
     return docker.image_exists('php')
コード例 #39
0
ファイル: luacheck.py プロジェクト: jpos15/lint-review
 def check_dependencies(self):
     return docker.image_exists('luacheck')
コード例 #40
0
ファイル: swiftlint.py プロジェクト: jpos15/lint-review
 def check_dependencies(self):
     """
     See if swiftlint is on the system path.
     """
     return docker.image_exists('swiftlint')
コード例 #41
0
ファイル: ansible.py プロジェクト: jpos15/lint-review
 def check_dependencies(self):
     return docker.image_exists('python2')
コード例 #42
0
ファイル: jsonlint.py プロジェクト: victorvianna/lint-review
 def check_dependencies(self):
     """
     See if the python2 image exists
     """
     return docker.image_exists('python2')
コード例 #43
0
ファイル: phpcs.py プロジェクト: markstory/lint-review
 def check_dependencies(self):
     """
     See if PHPCS is on the system path.
     """
     return docker.image_exists('phpcs')