Example #1
0
def Lint(ast):
    options = ['wcomment', 'wenum', 'winline', 'wparam', 'wpass', 'wname']
    wnone = GetOption('wnone')
    for opt in options:
        if wnone or GetOption(opt): ast.SetProperty(opt, True)

    skipList = []
    for filenode in ast.GetListOf('File'):
        name = filenode.GetProperty('NAME')
        if filenode.GetProperty('ERRORS') > 0:
            ErrOut.Log('%s : Skipped due to errors.' % name)
            skipList.append(filenode)
            continue
        warnings = IDLLinter().Visit(filenode, 0)
        if warnings:
            WarnOut.Log('%s warning(s) for %s\n' % (warnings, name))
    return skipList
 def Warn(self, node, msg):
     WarnOut.LogLine(node.filename, node.lineno, node.pos, msg)
     self.parse_warnings += 1
Example #3
0
 def Warning(self, msg):
   WarnOut.LogLine(self.filename, self.lineno, 0, ' %s %s' %
                   (str(self), msg))
Example #4
0
 def Warning(self, msg):
     """Log a warning for this object."""
     WarnOut.LogLine(self._filename, self.lineno, 0,
                     ' %s %s' % (str(self), msg))