Checks this code element for documentation related problems.

def warn(self, collection):
        """Checks this code element for documentation related problems."""
        if not self.has_docstring():
            collection.append("WARNING: no docstring on code element {}".format(self.name))