### SUMMARY

Update validate-modules to report messages using named error codes like `version-added` instead of error numbers like `E305`.

This would match the behavior of other tools we use, such as pylint, which have one named error code per rule. This will also make ignore entries much easier to read.

Doing this before 2.9 is released will avoid potential backwards compatibility issues with ignore entries in collections.

##### ISSUE TYPE

Feature Idea

##### COMPONENT NAME

validate-modules

"""Print out the test results in json format
        warnings is not respected in this output
        """
        ret = [len(r['errors']) for r in self.files.values()]
        with Reporter._output_handle(output) as handle:
            print(json.dumps(Reporter._filter_out_ok(self.files), indent=4, cls=ReporterEncoder), file=handle)
        return 3 if sum(ret) else 0
class Validator(with_metaclass(abc.ABCMeta, object)):
    """Validator instances are intended to be run on a single object.  if you
    are scanning multiple objects for problems, you'll want to have a separate
    Validator for each one."""
    def __init__(self, reporter=None):
        self.reporter = reporter
    @abc.abstractproperty
    def object_name(self):
        """Name of the object we validated"""
        pass
    @abc.abstractproperty
    def object_path(self):
        """Path of the object we validated"""
        pass
    @abc.abstractmethod
    def validate(self):
        """Run this method to generate the test results"""
        pass
class ModuleValidator(Validator):