auto(bfc0cfa2c3a4): session end @ 2026-07-17T12:25:27 (+1f)

This commit is contained in:
ssw committed 2026-07-17 12:25:27 +08:00
1 parent b37564171b
commit 3f87c226c2
1 file changed
+11 -10
+11 -10
View File
@@ -1,8 +1,10 @@
#!/usr/bin/env python3
"""Clean violation patterns from dacli source comments.
Targets 6 patterns from check_clean_comments.sh:
1. BS-[a-zA-Z]*[0-9] 2. R[0-9]+[a-z]*\b 3. Round[0-9]+
4. jxcj|workSystem|developSystem|tds 5. v0\.[0-9]+[a-z]*\+ 6. ssw-[a-z]+-(biz|common)
1. BS-[a-zA-Z]*[0-9] 2. R[0-9]+[a-z]* 3. Round[0-9]+
4. jxcj|workSystem|developSystem|tds 5. v0.XX.YY+ 6. ssw-XXX-biz/common
Only modifies comment lines (//, *, /*).
"""
import re, sys, os
@@ -37,17 +39,16 @@ def clean_line(line: str) -> str:
# --- Pattern 4: jxcj/workSystem/developSystem/tds ---
# Only in comments. Replace with generic term.
line = re.sub(r'\bjxcj\s+M1\b', 'app', line)
line = re.sub(r'\bjxcj\b', 'app', line)
line = re.sub(r'\bworkSystem\b', 'workSystem', line) # keep as-is for now (hard to replace)
line = re.sub(r'\bdevelopSystem\b', 'developSystem', line)
line = re.sub(r'\bworkSystem\b', 'reference app', line)
line = re.sub(r'\bdevelopSystem\b', 'reference app', line)
line = re.sub(r'\btds\b', 'app', line)
# --- Pattern 5: v0.x+ version markers ---
if re.match(r'^\s*//\s*v0\.\d+[a-z]*\+?\s*$', line): return ''
if re.match(r'^\s*\*\s*v0\.\d+[a-z]*\+?\s*$', line): return ''
line = re.sub(r'v0\.\d+[a-z]*\+?\s*:\s*', '', line)
line = re.sub(r'v0\.\d+[a-z]*\+?\s+', '', line)
# --- Pattern 5: v0.x+ version markers (handle v0.10, v0.10.1, v0.11h+, v0.21+) ---
if re.match(r'^\s*//\s*v0\.\d+(?:\.\d+)?[a-z]*\+?\s*$', line): return ''
if re.match(r'^\s*\*\s*v0\.\d+(?:\.\d+)?[a-z]*\+?\s*$', line): return ''
line = re.sub(r'v0\.\d+(?:\.\d+)?[a-z]*\+?\s*(?:fix|修复|修正)?\s*:\s*', '', line)
line = re.sub(r'v0\.\d+(?:\.\d+)?[a-z]*\+?\s+', '', line)
# --- Pattern 6: ssw-*-biz/ssw-common ---
# Only in comments. Remove or simplify.