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

"""Classes for storing and processing test results."""
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import datetime
import os
from . import types as t
from .util import (
    display,
)
from .util_common import (
    write_text_test_results,
    write_json_test_results,
    ResultType,
)
from .config import (
    TestConfig,
)
def calculate_best_confidence(choices, metadata):
    """
    :type choices: tuple[tuple[str, int]]
    :type metadata: Metadata
    :rtype: int
    """
    best_confidence = 0
    for path, line in choices:
        confidence = calculate_confidence(path, line, metadata)
        best_confidence = max(confidence, best_confidence)
    return best_confidence
def calculate_confidence(path, line, metadata):