@checker('.rst', severity=2)
def check_suspicious_constructs(fn, lines):
 inprod = False
 for (lno, line) in enumerate(lines):
  if seems_directive_re.match(line):
   (yield ((lno + 1), 'comment seems to be intended as a directive'))
  if ('.. productionlist::' in line):
   inprod = True
  elif ((not inprod) and default_role_re.search(line)):
   (yield ((lno + 1), 'default role used'))
  elif (inprod and (not line.strip())):
   inprod = False

@ checker ( '.rst' , severity = 2 ) def check_suspicious_constructs ( fn , lines ) : inprod = False for ( lno , line ) in enumerate ( lines ) : if seems_directive_re . match ( line ) : ( yield ( ( lno + 1 ) , 'comment seems to be intended as a directive' ) ) if ( '.. productionlist::' in line ) : inprod = True elif ( ( not inprod ) and default_role_re . search ( line ) ) : ( yield ( ( lno + 1 ) , 'default role used' ) ) elif ( inprod and ( not line . strip ( ) ) ) : inprod = False
check for suspicious rest constructs .