Skip to content

Commit

Permalink
[MegaLinter] Apply linters fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
llaville authored and megalinter-bot committed May 31, 2024
1 parent d1ec6f8 commit 3c96c77
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions megalinter/utilstest.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,9 @@ def test_linter_success(linter, test_self):
len(mega_linter.linters) > 0, "Linters have been created and run"
)
# Check console output
logging.info(f">>> LLA descriptor_id {linter.linter_name} linter_name {linter.linter_name} ")
logging.info(
f">>> LLA descriptor_id {linter.linter_name} linter_name {linter.linter_name} "
)

if linter.cli_lint_mode == "file":
if len(linter.file_names_regex) > 0 and len(linter.file_extensions) == 0:
Expand All @@ -188,7 +190,9 @@ def test_linter_success(linter, test_self):
)
else:
test_self.assertRegex(output, rf"\[{linter_name}\] .*good.* - SUCCESS")
elif ((linter.descriptor_id != "SPELL") and (linter.linter_name != "php-cs-fixer")): # This log doesn't appear in SPELL linters
elif (linter.descriptor_id != "SPELL") and (
linter.linter_name != "php-cs-fixer"
): # This log doesn't appear in SPELL linters
test_self.assertRegex(
output,
rf"Linted \[{linter.descriptor_id}\] files with \[{linter_name}\] successfully",
Expand All @@ -199,7 +203,9 @@ def test_linter_success(linter, test_self):
f"{tmp_report_folder}{os.path.sep}linters_logs"
f"{os.path.sep}{report_file_name}"
)
if linter.linter_name != "php-cs-fixer": # This log doesn't appear in PHP_PHPCSFIXER linter
if (
linter.linter_name != "php-cs-fixer"
): # This log doesn't appear in PHP_PHPCSFIXER linter
test_self.assertTrue(
os.path.isfile(text_report_file),
f"Unable to find text report {text_report_file}",
Expand Down

0 comments on commit 3c96c77

Please sign in to comment.