mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
Minor cleanup of code-smell tests. (#45658)
* Minor cleanup of code-smell tests. * Add exception handling for YAML load.
This commit is contained in:
@@ -129,7 +129,7 @@ def main():
|
||||
|
||||
with open(path, 'r') as path_fd:
|
||||
for line, text in enumerate(path_fd.readlines()):
|
||||
match = re.search(r'(?: |[^C]\()(_)(?: |,|\))', text)
|
||||
match = re.search(r'(?: |[^C]\()(_)(?:[ ,)])', text)
|
||||
|
||||
if match:
|
||||
print('%s:%d:%d: use `dummy` instead of `_` for a variable name' % (
|
||||
|
||||
Reference in New Issue
Block a user