fix(skills): Comprehensive syntax and symbol repair for all skills
Some checks failed
Deploy-Agent-V15-Stdin / JOB-V15-STDIN (push) Failing after 2s
Some checks failed
Deploy-Agent-V15-Stdin / JOB-V15-STDIN (push) Failing after 2s
This commit is contained in:
25
check_syntax.py
Normal file
25
check_syntax.py
Normal file
@@ -0,0 +1,25 @@
|
||||
import re, glob
|
||||
|
||||
def check_file(fp):
|
||||
with open(fp, 'r') as f:
|
||||
content = f.read()
|
||||
blocks = re.findall(r'#\+begin_src lisp\s+(.*?)\s+#\+end_src', content, re.DOTALL)
|
||||
code = ' '.join(blocks)
|
||||
|
||||
# Very simple check for unbalanced backquotes/commas
|
||||
# (Doesn't handle strings/comments perfectly but helps)
|
||||
backquotes = code.count('`')
|
||||
commas = code.count(',')
|
||||
|
||||
# Count character literals
|
||||
bq_chars = code.count('#\\`')
|
||||
comma_chars = code.count('#\\,')
|
||||
|
||||
real_commas = commas - comma_chars
|
||||
real_backquotes = backquotes - bq_chars
|
||||
|
||||
if real_commas > 0 and real_backquotes == 0:
|
||||
print(f"WARN: {fp} has {real_commas} commas but 0 backquotes.")
|
||||
|
||||
for fp in glob.glob('skills/*.org'):
|
||||
check_file(fp)
|
||||
Reference in New Issue
Block a user