### 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

for child in self.ast.body:
            found_try_except_import = False
            found_has = False
            if isinstance(child, TRY_EXCEPT):
                bodies = child.body
                for handler in child.handlers:
                    bodies.extend(handler.body)
                for grandchild in bodies:
                    if isinstance(grandchild, ast.Import):
                        found_try_except_import = True
                    if isinstance(grandchild, ast.Assign):
                        for target in grandchild.targets:
                            if target.id.lower().startswith('has_'):
                                found_has = True
            if found_try_except_import and not found_has:
                
                self.reporter.warning(
                    path=self.object_path,
                    code=291,
                    msg='Found Try/Except block without HAS_ assignment'
                )
    def _ensure_imports_below_docs(self, doc_info, first_callable):