You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 19, 2020. It is now read-only.
defrun():
parser=argparse.ArgumentParser(description='Codacy coverage reporter for Python.')
parser.add_argument("-r", "--report", help="coverage report file",
default=[DEFAULT_REPORT_FILE], type=str,
action='append')
parser.add_argument("-c", "--commit", type=str, help="git commit hash")
parser.add_argument("-d", "--directory", type=str, help="git top level directory")
parser.add_argument("-v", "--verbose", help="show debug information", action="store_true")
args=parser.parse_args()
ifargs.verbose:
logging.Logger.setLevel(logging.getLogger(), logging.DEBUG)
ifnotCODACY_PROJECT_TOKEN:
logging.error("environment variable CODACY_PROJECT_TOKEN is not defined.")
exit(1)
ifnotargs.commit:
args.commit=get_git_revision_hash()
# Explictly check ALL files before parsing anyforrfileinargs.report:
ifnotos.path.isfile(rfile):
logging.error("Coverage report "+args.report+" not found.")
exit(1)
Firstly, the logging should be:
logging.error("Coverage report " + rfile + " not found.")
But more importantly, it is failing because my specified path has been appended to [DEFAULT_REPORT_FILE] and the default path doesn't exist. Basically default path should only be added if no user-specified paths are supplied.
The text was updated successfully, but these errors were encountered: