mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-24 18:09:10 -07:00
Support ignore_changes
in code-smell tests.
This commit is contained in:
parent
b8a7e35b22
commit
06d83bae05
3 changed files with 32 additions and 15 deletions
|
@ -255,6 +255,7 @@ class SanityCodeSmellTest(SanityTest):
|
|||
files = self.config.get('files')
|
||||
always = self.config.get('always')
|
||||
text = self.config.get('text')
|
||||
ignore_changes = self.config.get('ignore_changes')
|
||||
|
||||
if output == 'path-line-column-message':
|
||||
pattern = '^(?P<path>[^:]*):(?P<line>[0-9]+):(?P<column>[0-9]+): (?P<message>.*)$'
|
||||
|
@ -263,7 +264,11 @@ class SanityCodeSmellTest(SanityTest):
|
|||
else:
|
||||
pattern = ApplicationError('Unsupported output type: %s' % output)
|
||||
|
||||
paths = sorted(i.path for i in targets.include)
|
||||
if ignore_changes:
|
||||
paths = sorted(i.path for i in targets.targets)
|
||||
always = False
|
||||
else:
|
||||
paths = sorted(i.path for i in targets.include)
|
||||
|
||||
if always:
|
||||
paths = []
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue