Skip to content

Commit

Permalink
Merge pull request #349 from codacy/doc/troubleshoot-checksum-CY-4874
Browse files Browse the repository at this point in the history
doc: Include workaround for checksum issues in troubleshooting CY-4874
  • Loading branch information
Paulo Ribeiro authored Sep 2, 2021
2 parents e605dbc + 98b771f commit 5c4e85d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
9 changes: 0 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,6 @@ Usage: codacy-coverage-reporter report
--> Succeeded!
```
## Checksum
Starting with version `13.0.0` the `get.sh` script does a checksum on the downloaded binary automatically.
To override this behavior and skip the checksum of the binary you can:
```bash
export CODACY_REPORTER_SKIP_CHECKSUM=true
```
## What is Codacy?
[Codacy](https://www.codacy.com/) is an Automated Code Review Tool that monitors your technical debt, helps you improve your code quality, teaches best practices to your developers, and helps you save time in Code Reviews.
Expand Down
12 changes: 12 additions & 0 deletions docs/troubleshooting-common-issues.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,18 @@ description: Instructions or workarounds to overcome common issues while using C

The sections below provide instructions or workarounds to overcome common issues while using Codacy Coverage Reporter.

## Can't validate checksum {: id="checksum"}

Starting on version [13.0.0](https://github.com/codacy/codacy-coverage-reporter/releases/tag/13.0.0) the `get.sh` script automatically validates the checksum of the downloaded Codacy Coverage Reporter binary. This requires having either the `sha512sum` or `shasum` command on the operating system where you're running the script.

If you're getting this error while uploading your coverage data to Codacy, install the correct version of `sha512sum` or `shasum` for the operating system that you're using.

You can also skip validating the checksum of the binary by defining the following environment variable, however, Codacy doesn't recommend this:

```bash
export CODACY_REPORTER_SKIP_CHECKSUM=true
```

## Can't guess any report due to no matching

Codacy Coverage Reporter automatically searches for coverage reports matching the [file name conventions for supported formats](index.md#generating-coverage).
Expand Down
2 changes: 1 addition & 1 deletion get.sh
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ checksum() {
elif command -v shasum > /dev/null 2>&1; then
sha_check_command="shasum -a 512"
else
fatal "Error: no method of validating checksum, please install 'sha512sum' or 'shasum'. You can skip this check by setting CODACY_REPORTER_SKIP_CHECKSUM=true"
fatal "Error: can't validate checksum, please see https://docs.codacy.com/coverage-reporter/troubleshooting-common-issues/#checksum"
fi

log "$i" "Expected checksum"
Expand Down

0 comments on commit 5c4e85d

Please sign in to comment.