def _process_file(err, package, name, file_data):

    name_lower = name.lower()

    if not name_lower.endswith((".css", ".js", ".xml", ".html", ".xhtml")):
        return False

    if not file_data:
        return None

    # Convert the file data to unicode
    file_data = unicodehelper.decode(file_data)

    if name_lower.endswith(".css"):
        testendpoint_css.test_css_file(err, name, file_data)

    elif name_lower.endswith(".js"):
        testendpoint_js.test_js_file(err, name, file_data)

    elif name_lower.endswith((".xml", ".html", ".xhtml")):
        p = testendpoint_markup.MarkupParser(err)
        p.process(name, file_data, package.info(name)["extension"])

    return True
Process a single file's content tests.
dataset/ETHPy150Open mozilla/app-validator/appvalidator/testcases/content.py/_process_file