archived-codacy / csharp-codacy-coverage

DEPRECATED C# coverage reporter for Codacy
Apache License 2.0
5 stars 3 forks source link

Added exit code 1 when cmd line not parsed correctly #12

Closed pamidur closed 4 years ago

pamidur commented 4 years ago

The problem

My CI build is executed like this

./codacy -c $HASH -t $TOKEN -r $coverage_file -e opencover

and I forgot to set the $TOKEN, the result however is successful

Codacy.CSharpCoverage 1.0.0
Copyright (C) 2019 Codacy.CSharpCoverage

ERROR(S):
  Option 't, token' has no value.
  Required option 't, token' is missing.

> echo $?
0

The solution

Make the app return status code 1 when there were command line parsing errors