Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOCS-207] Feedback on "Adding coverage to your repository" #479

Open
1 task done
tarvinder1 opened this issue Feb 19, 2021 · 5 comments · Fixed by codacy/codacy-coverage-reporter#300
Open
1 task done
Labels
missing info Missing information user feedback User feedback on the documentation

Comments

@tarvinder1
Copy link

Type of feedback

  • Missing information

Feedback
The page doesnt specify from which location Codacy Coverage Reporter is to be run. Also what is the name of the report file which the tool is expecting to work on

Affected pages
This feedback applies to the following documentation pages / URLs:
https://docs.codacy.com/coverage-reporter/adding-coverage-to-your-repository/

@github-actions
Copy link
Contributor

Internal Jira issue: DOCS-207

@github-actions github-actions bot changed the title Feedback on "Adding coverage to your repository" [DOCS-207] Feedback on "Adding coverage to your repository" Feb 19, 2021
@prcr prcr added missing info Missing information user feedback User feedback on the documentation labels Feb 22, 2021
@tarvinder1
Copy link
Author

tarvinder1 commented Feb 22, 2021

I have figured out the right way. To run the report, the name of the file is given via -r flag. The report could be stored in the subfolder but it needs to be within the Git repository(and correctly checked out branch)

bash <(curl -Ls https://coverage.codacy.com/get.sh) report -r coverage.xml

Also, I found this command failing when its specified in the buildspec.yaml file for aws code build projects. I had to split the command to 2 as it was reporting syntax errors.

@prcr
Copy link
Contributor

prcr commented Feb 23, 2021

Thanks for the extra information @tarvinder1! I will propose some improvements to the documentation soon taking into account your feedback.

@prcr
Copy link
Contributor

prcr commented Mar 3, 2021

We made the improvements in codacy/codacy-coverage-reporter#300 to address your feedback, @tarvinder1. Please have a look if you have the time.

Regarding the issue of the syntax errors when running the command bash <(curl -Ls https://coverage.codacy.com/get.sh) report, we have a page suggesting alternative ways of running the Codacy Coverage Reporter. Your workaround is not included on that page, but if you're able to provide us with the exact error that you were getting, perhaps I can include a new entry on the troubleshooting page instead.

@tarvinder1
Copy link
Author

Here is the error received while running the command on ubuntu containers. This extract is from aws codebuild project which uses aws codebuild image built on ubuntu containers.

1001 | [Container] 2021/02/22 17:15:09 Running command (bash <(curl -Ls https://coverage.codacy.com/get.sh) report -r coverage.xml)
1002 | /codebuild/output/tmp/script.sh: 4: /codebuild/output/tmp/script.sh: Syntax error: "(" unexpected
1003 |  
1004 | [Container] 2021/02/22 17:15:09 Command did not exit successfully (bash <(curl -Ls https://coverage.codacy.com/get.sh) report -r coverage.xml) exit status 2
1005 | [Container] 2021/02/22 17:15:09 Phase complete: POST_BUILD State: FAILED
1006 | [Container] 2021/02/22 17:15:09 Phase context status code: COMMAND_EXECUTION_ERROR Message: Error while executing command: (bash <(curl -Ls https://coverage.codacy.com/get.sh) report -r coverage.xml). Reason: exit status 2

Might be some shell interpretation issue or some internal subcommand not being recognized on container. The same thing worked when I split the command like this:
$ curl -sL https://coverage.codacy.com/get.sh -o get.sh && chmod +x ./get.sh
$ ./get.sh report -r coverage.xml

@prcr prcr reopened this Mar 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
missing info Missing information user feedback User feedback on the documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants