File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ class CopyrightValidator:
1919 """Validates copyright headers in source files."""
2020
2121 # Common patterns for comment block terminators
22- TRAILING_COMMENT_TERMINATORS = r'(\*/|-->)\s*$'
22+ TRAILING_COMMENT_TERMINATORS = r'(\*/|-->|:\) )\s*$'
2323
2424 def __init__ (self , config_file : str ):
2525 """Initialize validator with configuration file."""
@@ -139,8 +139,8 @@ def _extract_copyright_from_content(self, content: str) -> str:
139139 lines = content .split ('\n ' )
140140 # Look for copyright in first 20 lines
141141 for line in lines [:20 ]:
142- # Remove common leading comment characters and whitespace (including HTML <!-- starts)
143- cleaned_line = re .sub (r'^[\s\*#\/]*(?:<!--)?' , '' , line ).strip ()
142+ # Remove common leading comment characters and whitespace (including HTML <!-- starts and XQuery (: )
143+ cleaned_line = re .sub (r'^[\s\*#\/]*(?:<!--|\(: )?' , '' , line ).strip ()
144144 # Trim common trailing block terminators if present on same line
145145 cleaned_line = re .sub (self .TRAILING_COMMENT_TERMINATORS , '' , cleaned_line ).strip ()
146146 if cleaned_line .lower ().startswith ('copyright' ):
You can’t perform that action at this time.
0 commit comments