def METHOD_NAME():
    """
    True if mandatory environment variables are set otherwise False and print
    error messages.
    """
    no_missing_env_var = True
    if os.environ.get('CC_REPO_DIR') is None:
        LOG.error("When using gerrit output the 'CC_REPO_DIR' environment "
                  "variable needs to be set to the root directory of the "
                  "sources, i.e. the directory where the repository was "
                  "cloned!")
        no_missing_env_var = False
    if os.environ.get('CC_CHANGED_FILES') is None:
        LOG.error("When using gerrit output the 'CC_CHANGED_FILES' "
                  "environment variable needs to be set to the path of "
                  "changed files json from Gerrit!")
        no_missing_env_var = False
    return no_missing_env_var