Skip to content

Commit

Permalink
fix: Update regex to detect all variants of /* istanbul ignore */ com…
Browse files Browse the repository at this point in the history
…ments
  • Loading branch information
khushipatil1523 committed Jan 9, 2025
1 parent c2ab64a commit 5825453
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/scripts/code_coverage_disable_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,11 @@ def has_code_coverage_disable(file_path):
"""
code_coverage_disable_pattern = re.compile(
r"""//?\s*istanbul\s+ignore(?:\s+(?:next|line)(?:\s*--\s*\S*)?)?[^\n]*|
/\*\s*istanbul\s+ignore(?:\s+(?:next|line)(?:\s*--\s*\S*)?)?\s*\*/""",
/\*.*istanbul\s+ignore(?:\s+(?:next|line)(?:\s*--\s*\S*)?)?.*\*/""",
re.IGNORECASE,
)


try:
with open(file_path, "r", encoding="utf-8") as file:
content = file.read()
Expand Down

0 comments on commit 5825453

Please sign in to comment.