forked from coala/coala-bears
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Closes coala#794
- Loading branch information
Sri Sanketh U
committed
Jul 16, 2017
1 parent
c9be1bf
commit 5c28625
Showing
3 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
aenum~=2.0.8 | ||
ansible-lint~=3.4.12 | ||
apertium-lint~=0.29 | ||
autoflake~=0.6.6 | ||
autopep8~=1.2 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
from coalib.bearlib.abstractions.Linter import linter | ||
from dependency_management.requirements.PipRequirement import PipRequirement | ||
|
||
|
||
@linter(executable='ansible-lint', | ||
output_format='regex', | ||
output_regex=r'') | ||
class AnsibleLintBear: | ||
''' | ||
Check and correct ansible playbooks using ``ansible-lint``. | ||
See <https://github.com/willthames/ansible-lint/> for details about the tool. | ||
''' | ||
|
||
LANGUAGES = {'Ansible'} | ||
REQUIREMENTS = {PipRequirement('ansible-lint', '3.4.12')} | ||
AUTHORS = {'The coala developers'} | ||
AUTHORS_EMAILS = {'[email protected]'} | ||
LICENSE = 'AGPL-3.0' | ||
ASCIINEMA_URL = '' | ||
CAN_FIX = {'Syntax'} | ||
|
||
@staticmethod | ||
def create_arguments(filename, file): | ||
return |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from bears.configfiles.AnsibleLintBear import AnsibleLintBear | ||
from coalib.testing.LocalBearTestHelper import verify_local_bear | ||
|
||
good_file = """ | ||
""" | ||
|
||
bad_file = """ | ||
""" | ||
|
||
PuppetLintBearTest = verify_local_bear(AnsibleLintBear, | ||
valid_files=(good_file,), | ||
invalid_files=(bad_file,)) |