Exemple #1
0
 def lint(self):
     lint_name = self._config.config['verifier']['lint']['name']
     if lint_name == 'flake8':
         return flake8.Flake8(self._config)
     if lint_name == 'rubocop':
         return rubocop.RuboCop(self._config)
     if lint_name == 'yamllint':
         return yamllint.Yamllint(self._config)
Exemple #2
0
 def lint(self):
     lint_name = self._config.config['verifier']['lint']['name']
     if lint_name == 'flake8':
         return flake8.Flake8(self._config)
     elif lint_name == 'None':
         return
     else:
         util.exit_with_invalid_section('lint', lint_name)
Exemple #3
0
 def lint(self):
     lint_name = self._config.config['verifier']['lint']['name']
     if lint_name == 'flake8':
         return flake8.Flake8(self._config)
     if lint_name == 'pre-commit':
         return precommit.PreCommit(self._config)
     if lint_name == 'rubocop':
         return rubocop.RuboCop(self._config)
     if lint_name == 'yamllint':
         return yamllint.Yamllint(self._config)
     if lint_name == 'ansible-lint':
         return ansible_lint.AnsibleLint(self._config)
Exemple #4
0
def _instance(patched_config_validate, config_instance):
    return flake8.Flake8(config_instance)
Exemple #5
0
 def lint(self):
     lint_name = self._config.config['verifier']['lint']['name']
     if lint_name == 'flake8':
         return flake8.Flake8(self._config)
Exemple #6
0
def flake8_instance(molecule_verifier_lint_section_data, config_instance):
    config_instance.merge_dicts(config_instance.config,
                                molecule_verifier_lint_section_data)

    return flake8.Flake8(config_instance)