INNER CODE UNIT · Python
check_file
sangrokjung/claude-forge · scripts/emdash_slop_check.py:97
def check_file(path: str):
try:
with open(path, encoding='utf-8') as f:
content = f.read()
except (OSError, UnicodeDecodeError):
return []
if not is_korean_dominant(content):
return []
lines = content.splitlines()
hits = []
in_code = False
for n, line in enumerate(lines, 1):
stripped = line.strip()
if stripped.startswith('```'):
in_code = not in_code
continue