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 PalisadoesFoundation#3217  (PalisadoesFoundation#3221)

* fix: Update regex to detect all variants of /* istanbul ignore */ comments

* Update code_coverage_disable_check.py

* Update code_coverage_disable_check.py

* fix: Update regex to detect all variants of /* istanbul ignore */ comments

* fix: Update regex to detect all variants of /* istanbul ignore */ comments

* fix: Update regex to detect all variants of /* istanbul ignore */ comments
  • Loading branch information
khushipatil1523 authored Jan 10, 2025
1 parent e9aec17 commit eceaad9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/scripts/code_coverage_disable_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,11 @@ def has_code_coverage_disable(file_path):
otherwise.
"""
code_coverage_disable_pattern = re.compile(
r"""//?\s*istanbul\s+ignore(?:\s+(?:next|-line))?[^\n]*|
/\*\s*istanbul\s+ignore\s+(?:next|-line)\s*\*/""",
r"/\*\s*istanbul\s+ignore.*?\*/|//?\s*istanbul\s+ignore(?:\s+(?:next|-line))?[^\n]*",
re.IGNORECASE,
)


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

0 comments on commit eceaad9

Please sign in to comment.