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 10, 2025
1 parent 5825453 commit cc76e26
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/scripts/code_coverage_disable_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,9 @@ def has_code_coverage_disable(file_path):
otherwise.
"""
code_coverage_disable_pattern = re.compile(
r"""//?\s*istanbul\s+ignore(?:\s+(?:next|line)(?:\s*--\s*\S*)?)?[^\n]*|
/\*.*istanbul\s+ignore(?:\s+(?:next|line)(?:\s*--\s*\S*)?)?.*\*/""",
re.IGNORECASE,
)
r"/\*\s*istanbul\s+ignore.*?\*/|//?\s*istanbul\s+ignore(?:\s+(?:next|-line))?[^\n]*",
re.IGNORECASE,
)


try:
Expand Down

0 comments on commit cc76e26

Please sign in to comment.