'Process the module.'

def process_module(self, node):

    if (os.path.basename(os.path.splitext(node.file)[0]) == '__init__'):
        return
    max_lineno = 1
    with contextlib.closing(node.stream()) as stream:
        for (lineno, line) in enumerate(stream):
            if ((lineno == 1) and line.startswith('#!')):
                max_lineno += 1
                continue
            elif line.startswith('#    vim:'):
                if (lineno > max_lineno):
                    self.add_message('modeline-position', line=lineno)
                if (line.rstrip() != '#    vim:    ft=python    fileencoding=utf-8    sts=4    sw=4    et:'):
                    self.add_message('invalid-modeline', line=lineno)
                break
        else:
            self.add_message('modeline-missing', line=1)
