archived-codacy / node-codacy-coverage Goto Github PK
View Code? Open in Web Editor NEWCode Coverage reporter for Codacy
License: MIT License
Code Coverage reporter for Codacy
License: MIT License
hello, i just got this from an npm audit
. it doesn't look like there's a fix yet, but perhaps codacity should do something to address this.
cheers!
# Run `npm update stringstream --depth 3` to resolve 1 vulnerability
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ moderate │ Out-of-bounds Read │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package │ stringstream │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ codacy-coverage [dev] │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path │ codacy-coverage > request > stringstream │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info │ https://nodesecurity.io/advisories/664 │
└───────────────┴──────────────────────────────────────────────────────────────┘
I ran Codacy coverage on TravisCI to test the coverage of an Angular library.
I run into the following error:
0.92s$ cat coverage/lcov.info | codacy-coverage --username 'maximelafarie' --projectName 'ngx-smart-modal'
[error] "2018-03-06T15:18:54.987Z" 'Status Code [404] - Error [{"error":"not found"}]'
[error] "2018-03-06T15:18:54.993Z" 'Error sending coverage'
[error] "2018-03-06T15:18:54.993Z" Error: Expected Successful Status Code, but got [404]
at /home/travis/.nvm/versions/node/v9.7.1/lib/node_modules/codacy-coverage/lib/reporter.js:109:23
at tryCatcher (/home/travis/.nvm/versions/node/v9.7.1/lib/node_modules/codacy-coverage/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/home/travis/.nvm/versions/node/v9.7.1/lib/node_modules/codacy-coverage/node_modules/bluebird/js/release/promise.js:512:31)
at Promise._settlePromise (/home/travis/.nvm/versions/node/v9.7.1/lib/node_modules/codacy-coverage/node_modules/bluebird/js/release/promise.js:569:18)
at Promise._settlePromise0 (/home/travis/.nvm/versions/node/v9.7.1/lib/node_modules/codacy-coverage/node_modules/bluebird/js/release/promise.js:614:10)
at Promise._settlePromises (/home/travis/.nvm/versions/node/v9.7.1/lib/node_modules/codacy-coverage/node_modules/bluebird/js/release/promise.js:689:18)
at Async._drainQueue (/home/travis/.nvm/versions/node/v9.7.1/lib/node_modules/codacy-coverage/node_modules/bluebird/js/release/async.js:133:16)
at Async._drainQueues (/home/travis/.nvm/versions/node/v9.7.1/lib/node_modules/codacy-coverage/node_modules/bluebird/js/release/async.js:143:10)
at Immediate.Async.drainQueues [as _onImmediate] (/home/travis/.nvm/versions/node/v9.7.1/lib/node_modules/codacy-coverage/node_modules/bluebird/js/release/async.js:17:14)
at runCallback (timers.js:763:18)
at tryOnImmediate (timers.js:734:5)
at processImmediate (timers.js:716:5)
Here's the full output: https://travis-ci.org/biig-io/ngx-smart-modal/builds/349861754
(Codacy error is located line 2129)
The full .travis.yml file is located here
I really don't know the origin of the error, given that the error message isn't very explicit and all works well with tools like codecov and codeclimate (the lcov file is successfully sent as the TravisCI job output shows).
I've got some legacy node v6 builds failing due to an engine requirement from one of your deps:
https://travis-ci.org/mgcrea/redux-rest-resource/jobs/393570711
yarn install v1.3.2
[1/4] Resolving packages...
[2/4] Fetching packages...
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
error [email protected]: The engine "node" is incompatible with this module. Expected version ">=8.9.0".
error Found incompatible module
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
The command "eval yarn " failed. Retrying, 2 of 3.
$ yarn why joi
yarn why v1.7.0
[1/4] 🤔 Why do we have the module "joi"...?
[2/4] 🚚 Initialising dependency graph...
[3/4] 🔍 Finding dependency...
[4/4] 🚡 Calculating file sizes...
=> Found "[email protected]"
info Reasons this module exists
- "codacy-coverage" depends on it
- Hoisted from "codacy-coverage#joi"
info Disk size without dependencies: "156MB"
info Disk size with unique dependencies: "256MB"
info Disk size with transitive dependencies: "272MB"
info Number of shared dependencies: 4
✨ Done in 0.65s.
Since your package is supposed to be used for testing having it stuck only on node >=8.9.0
is a bit counter-productive.
Exactly what the title says:
I've followed the instructions on the "Setup GitHub" page for setting up the web hook in GitHub. I've yet to see Codacy show up in my post-commit checks. I've checked on my Codacy webhook page in GitHub and it tells me that it's sending messages.
Nothing (no Open Pull Requests or Merged Pull Requests) show up on the Pull Requests page in Codacy. The page is completely empty. What gives?
No coverage displayed after sending valid lcov report.
Note: Need to take into account that this steps works fine in previous releases.
10.16.0
Windows 10
Jest
I am trying to send the jest coverage to Codacy running this (Multiple variants)
jest --config .jestrc.js && codacy-coverage -e https://codacy.company.com:16006 --accountToken xxxxxxxx --username user --projectName project --verbose < src/scripts/tests/unit-test-coverage/lcov.info
jest --config .jestrc.js && codacy-coverage -e https://codacy.company.com:16006 --token xxxxxx --verbose < src/scripts/tests/unit-test-coverage/lcov.info
Both variants fail with pretty much the same error
Getting this error:
$ jest --config .jestrc.js && codacy-coverage --token xxxxxxxxxxxxx --verbose < src/scripts/tests/unit-test-coverage/lcov.info
PASS test src/scripts/vuejs/store/modules/plan/__tests__/mutations.spec.js
PASS test src/scripts/services/__tests__/Plan.service.spec.js
PASS test src/scripts/services/__tests__/browseApi.service.spec.js
PASS test src/scripts/vuejs/store/modules/plan/__tests__/actions.spec.js
PASS test src/scripts/vuejs/components/plan/__tests__/PlanTitle.spec.js
PASS test src/scripts/vuejs/store/modules/plan/__tests__/getters.spec.js
PASS test src/scripts/tests/specs/test.spec.js
PASS test src/scripts/vuejs/components/plan/__tests__/PlanSelect.spec.js
PASS test src/scripts/vuejs/components/plan/__tests__/PlanLeftNavPanel.spec.js
Test Suites: 9 passed, 9 total
Tests: 42 passed, 42 total
Snapshots: 0 total
Time: 5.301s
Ran all test suites.
[info] "2019-09-05T20:31:00.211Z" 'Started with: token ["xxxxxxxxxxxxx"], accountToken [undefined], username [undefined], projectName [undefined], commitId [undefined], language [undefined], endpoint [undefined], format [undefined], path prefix [undefined], verbose [true], debug [undefined]'
[info] "2019-09-05T20:31:00.224Z" 'Handling input for: token ["xxxxxxxxxxxxx"], accountToken [undefined], username [undefined], projectName [undefined], commitId [undefined], language [undefined], endpoint [undefined], format ["lcov"], path prefix [""], verbose [true], debug [undefined]
'
[debug] "2019-09-05T20:31:00.229Z" 'Parsing Lcov Data'
[debug] "2019-09-05T20:31:00.302Z" 'Successfully Parsed Lcov Data'
[debug] "2019-09-05T20:31:00.308Z" 'Sending coverage'
[error] "2019-09-05T20:31:01.360Z" 'Status Code [404] - Error [{"error":"not found"}]'
[error] "2019-09-05T20:31:01.363Z" 'Error sending coverage'
[error] "2019-09-05T20:31:01.381Z" Error: Expected Successful Status Code, but got [404]
at C:\src\projectx\node_modules\codacy-coverage\lib\reporter.js:110:23
at tryCatcher (C:\src\projectx\node_modules\bluebird\js\release\util.js:16:23)
at Promise._settlePromiseFromHandler (C:\src\projectx\node_modules\bluebird\js\release\promise.js:517:31)
at Promise._settlePromise (C:\src\projectx\node_modules\bluebird\js\release\promise.js:574:18)
at Promise._settlePromise0 (C:\src\projectx\node_modules\bluebird\js\release\promise.js:619:10)
at Promise._settlePromises (C:\src\projectx\node_modules\bluebird\js\release\promise.js:695:18)
at _drainQueueStep (C:\src\projectx\node_modules\bluebird\js\release\async.js:138:12)
at _drainQueue (C:\src\projectx\node_modules\bluebird\js\release\async.js:131:9)
at Async._drainQueues (C:\src\projectx\node_modules\bluebird\js\release\async.js:147:5)
at Immediate.Async.drainQueues [as _onImmediate] (C:\src\projectx\node_modules\bluebird\js\release\async.js:17:14)
at runCallback (timers.js:705:18)
at tryOnImmediate (timers.js:676:5)
at processImmediate (timers.js:658:5)
Any Help?
v12.14.1
Darwin JounQin-MBP 19.2.0 Darwin Kernel Version 19.2.0: Sat Nov 9 03:47:04 PST 2019; root:xnu-6153.61.1~20/RELEASE_X86_64 x86_64
Work like previous projects.
I provided CODACY_ACCOUNT_TOKEN
and CODACY_PROJECT_TOKEN
environments, but name
and projectName
is still required, but I didn't figure out what should I pass through.
cat ./coverage/lcov.info | codacy-coverage -u JounQin -n rx-ts/pkgr
https://github.com/rx-ts/pkgr/runs/380810917?check_suite_focus=true#step:7:50
No coverage displayed after sending valid lcov report
Prerequisities:
Steps to reproduce:
cat ${COVERAGE_PATH}"/lcov.info" | codacy-coverage --debug
[debug] "2016-05-13T09:00:01.658Z" 'Successfully sent coverage'
)Expected result: coverage info is displayed.
Actual result: coverage info is not displayed. After click on Setup Coverage
button the following information is displayed:
Oops! We weren't able to validate your report. Ping us on the support chat and we will help you figure it out.
Please refer to the attached coverage file (lcov.info.txt) that is generated by instanbul.
Please refer to the full TRAVIS CI log: https://s3.amazonaws.com/archive.travis-ci.org/jobs/129941728/log.txt
I am building applications with the Vue.js front-end framework.
Jest is able to test the .vue
files (that contain javascript), providing the same coverage reports as any .js
or .ts
files.
On the Codacy platform these files are purely and simply ignored; but they are also excluded from code coverage. In any application you can expect a big part of the percentage of JavaScript code to be located in the .vue
files. Hence, the % coverage displayed on the platform is misleading.
Without the need for static analysis on .vue
files (I use one of Codacy's competitors for this), it stops me (and probably other people) from using Codacy's coverage because of this.
I'm not sure if that's on the coverage provider side or on the web platform side (or both), but just adding these .vue
files to the coverage recap, without any other Codacy feature, would be a huge plus for us.
12.12.0 and 12.13.0
macOS 10.15
Jest
Locally, it works just fine. I am able to run my tests and send the coverage report to Codacy without a problem, but on the server I get an inexplicable error that I have no idea how to solve. The following is the log output with the --debug
flag set:
[info] "2019-10-22T08:34:58.607Z" 'Started with: token [undefined], accountToken [undefined], username [undefined], projectName [undefined], commitId [undefined], language [undefined], endpoint [undefined], format [undefined], path prefix ["."], verbose [undefined], debug [true]'
[trace] "2019-10-22T08:34:58.611Z" 'Got chunk'
[trace] "2019-10-22T08:34:58.613Z" 'Received file through stdin'
[info] "2019-10-22T08:34:58.613Z" 'Handling input for: token ["TOKEN REDACTED"], accountToken [undefined], username [undefined], projectName [undefined], commitId [undefined], language [undefined], endpoint [undefined], format ["lcov"], path prefix ["."], verbose [undefined], debug [true]'
[debug] "2019-10-22T08:34:58.616Z" 'Parsing Lcov Data'
[trace] "2019-10-22T08:34:58.649Z" 'Successfully parsed /app/src/app.ts'
... (all files successfully parsed)
[debug] "2019-10-22T08:34:58.664Z" 'Successfully Parsed Lcov Data'
[error] "2019-10-22T08:34:58.670Z" 'Error sending coverage'
[error] "2019-10-22T08:34:58.671Z" Error: Command failed: git rev-parse HEAD
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
at ChildProcess.exithandler (child_process.js:295:12)
at ChildProcess.emit (events.js:210:5)
at maybeClose (internal/child_process.js:1021:16)
at Socket.<anonymous> (internal/child_process.js:430:11)
at Socket.emit (events.js:210:5)
at Pipe.<anonymous> (net.js:658:12) {
killed: false,
code: 128,
signal: null,
cmd: 'git rev-parse HEAD'
}
This is the command I used to run it:
cat ./test-coverage/lcov.info | codacy-coverage -p . --debug
I've tried it both with and without the -p
flag.
Why would it try to do anything with git?!
Hey guys,
I'm using retire.js to keep track of security issues for a project and i have found out an issue in the version 2.0.3 of node-codacy-coverage lib.
Below is the result of retire's scan:
growl 1.9.2 has known vulnerabilities: severity: high; summary: growl_command-injection; https://nodesecurity.io/advisories/146
multichannel.log 1.0.0
↳ codacy-coverage 2.0.3
↳ growl 1.9.2
growl 1.9.2 has known vulnerabilities: severity: high; summary: growl_command-injection; https://nodesecurity.io/advisories/146
multichannel.log 1.0.0
↳ codacy-coverage 2.0.3
↳ mocha 2.5.3
↳ growl 1.9.2
The solution is update growl to version 1.10.2 or greater.
Is there any plan to upgrade project dependencies?
What's happening is that Travis is setting the TRAVIS_COMMIT environment variable to the commit associated with the build but since this test is for a merge it actually has a different commit id which causes the test case to fail. The reason why this is just now showing itself (as opposed to previously) is because Travis just recently added the reporting of Pull Request merged builds to their Github integration.
I'm not sure yet how to address this 100% and still keep the accuracy of the test. But the Environment variables Travis provides can be found here.
Hi,
I am trying to send coverage to codecy using mocha on windows machine which is my local machine.
I am using following command
istanbul cover ./node_modules/mocha/bin/_mocha ./test --report lcovonly -- -R spec && type ./coverage/lcov.info | codacy-coverage --token && rm -rf ./coverage
However I get following error message . Any idea what this means ?
name: 'ValidationError',
details:
[ { message: '"value" is not allowed to be empty',
path: [],
type: 'any.empty',
context: [Object] } ],
_object: '',
annotate: [Function] }
[error] "2018-12-27T00:50:29.650Z" 'Error sending coverage'
[error] "2018-12-27T00:50:29.650Z" { ValidationError: "value" is not allowed to be empty
at Object.exports.process (C:
v8.11.1
macOS 10.14
Please describe the expected behavior of the issue, starting from the first action.
Getting the following error.
yarn add -D codacy-coverage
yarn add v1.10.1
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
error [email protected]: The engine "node" is incompatible with this module. Expected version ">=8.12.0". Got "8.11.1"
error Found incompatible module
I just wanted to point out that installation is failing on Node less than 8.12
due to a dependency on topo
through joi
. This is fixed with an upgrade to 8.12
, but I do not believe that the dependency on Node v8.12
is documented.
I'm having troubles when sending the reports (lcov.info generated by JEST) to codacy-coverage:
Token incorrect
cat coverage/lcov.info | codacy-coverage [error] "2017-08-15T18:13:51.688Z" 'Status Code [404] - Error [{"error":"not found"}]' [error] "2017-08-15T18:13:51.691Z" 'Error sending coverage' [error] "2017-08-15T18:13:51.691Z" Error: Expected Successful Status Code, but got [404] at /usr/local/lib/node_modules/codacy-coverage/lib/reporter.js:101:23
In order to avoid this:
Go "Account" > "API Tokens" (copy the string in the input)
When triggering test action from package.json, the accountToken needs to be the correct one. Add the token copied above into this action:
"test": "node scripts/test.js --env=jsdom --coverage && cat ./coverage/lcov.info | codacy-coverage --accountToken <TOKEN> --username <USERNAME> --projectName <PROJECT_NAME>"
In the official docs, the account token that you add is the Project API Token, this is wrong!!!
Hello,
I'm trying to configure codacy coverage but I have an error when I pipe result of lcov to your module
Have you an idea of the problem ?
Thanks !
My modules versions in package.json :
"blanket": "1.1.7",
"codacy-coverage": "^1.1.0",
"mocha": "^2.1.0",
"mocha-blanket-lcov-reporter": "0.0.1"
Command ran :
./node_modules/mocha/bin/mocha -r blanket -R mocha-blanket-lcov-reporter
| ./node_modules/codacy-coverage/bin/codacy-coverage.js
Output error :
Failed to load c++ bson extension, using pure JS version
[error] "2015-05-22T08:42:41.438Z" { [ValidationError: child "total" fails because ["total" must be a number]]
name: 'ValidationError',
details:
[ { message: '"total" must be a number',
path: 'total',
type: 'number.base',
context: [Object] } ],
_object:
{ total: NaN,
fileReports:
[ [Object],
[Object],
[Object],
[Object],
[Object],
[Object],
[Object],
[Object],
[Object],
I would like to upload coverage reports related to other languages (Ex: Jacoco reports for Java) using this package. Currently, it only supports coverage uploads for javascript.
Some users have tried to use this lib to send coverage for typescript projects. while the report is successfully send, it is hardcoded to be a Javascript coverage report (as may be seen at https://github.com/codacy/node-codacy-coverage/blob/9e3b57d4e393df9b24b64a7c947b6674019b3aa5/lib/reporter.js#L29)
Allowing to specify a language different from javascript (javascript as default probaby?), as Typescript or Coffescript, should be enough to fix the problem
Using latest mocha, jscoverage, codacy-coverage.
Project nf404/crypto-api
./node_modules/.bin/mocha -r jscoverage -R mocha-lcov-reporter test
Result:
⁍ Coverage lib/crypto-api.js line[ 95%] branch[100%]
⁍ Coverage lib/enc.hex.js line[100%] branch[100%]
⁍ Coverage lib/hasher.md2.js line[100%] branch[100%]
⁍ Coverage lib/hasher.md4.js line[100%] branch[100%]
⁍ Coverage lib/hasher.md5.js line[100%] branch[100%]
⁍ Coverage lib/hasher.sha0.js line[100%] branch[100%]
⁍ Coverage lib/hasher.sha1.js line[100%] branch[100%]
⁍ Coverage lib/hasher.sha256.js line[100%] branch[100%]
SF:lib/crypto-api.js
DA:1,1
DA:7,1
DA:9,1
DA:10,38
DA:11,38
DA:12,38
DA:13,38
DA:19,1
DA:24,1
DA:29,1
DA:34,1
DA:40,1
DA:45,1
DA:50,1
DA:55,1
DA:60,1
DA:65,1
DA:66,0
DA:72,1
DA:73,0
DA:80,1
DA:82,46
DA:83,46
DA:85,2862
DA:88,38
DA:89,38
DA:91,84
DA:92,84
DA:97,1
DA:99,94
DA:101,69
DA:105,3264
DA:109,1152
DA:113,69
DA:115,25
DA:125,1
DA:126,37
DA:133,1
DA:134,0
DA:137,1
DA:138,1
DA:140,1
DA:146,1
DA:148,1
DA:150,7
DA:158,1
DA:159,39
DA:161,1
DA:163,38
DA:166,1
DA:167,1
DA:169,1
DA:175,1
DA:177,1
DA:179,1
DA:187,1
DA:188,38
DA:190,1
DA:192,37
DA:195,1
DA:202,1
DA:203,5328
DA:211,1
DA:212,17280
DA:219,1
DA:220,38
DA:221,38
DA:223,1
DA:224,1
DA:225,1
DA:232,1
DA:233,38
DA:236,1
DA:237,1
DA:238,1
DA:239,1
DA:241,1
DA:242,1
DA:243,1
DA:244,1
DA:245,1
DA:253,1
DA:254,39
DA:262,1
DA:263,39
DA:270,1
DA:271,38
DA:273,1
DA:275,1
DA:277,0
end_of_record
SF:lib/enc.hex.js
DA:1,2
DA:3,1
DA:5,1
DA:7,1
DA:14,1
DA:16,1
DA:17,37
DA:19,1
DA:20,1
DA:21,1
DA:23,736
DA:24,736
DA:26,37
DA:29,1
DA:30,1
end_of_record
SF:lib/hasher.md2.js
DA:1,2
DA:3,1
DA:5,1
DA:7,1
DA:14,1
DA:16,1
DA:17,8
DA:18,8
DA:19,8
DA:21,1
DA:23,1
DA:25,1
DA:26,1
DA:32,1
DA:53,1
DA:58,1
DA:63,1
DA:65,1
DA:68,400
DA:69,400
DA:73,25
DA:76,21600
DA:78,450
DA:82,25
DA:84,400
DA:88,1
DA:90,8
DA:91,8
DA:94,8
DA:97,8
DA:100,1
DA:101,1
end_of_record
SF:lib/hasher.md4.js
DA:1,2
DA:3,1
DA:5,1
DA:7,1
DA:14,1
DA:16,1
DA:17,7
DA:18,7
DA:20,1
DA:22,1
DA:24,1
DA:25,1
DA:31,1
DA:34,1
DA:39,1
DA:40,1
DA:41,1
DA:44,1
DA:45,144
DA:47,1
DA:48,144
DA:50,1
DA:51,144
DA:53,1
DA:54,432
DA:57,1
DA:59,9
DA:60,9
DA:61,9
DA:62,9
DA:65,9
DA:66,9
DA:67,9
DA:68,9
DA:69,9
DA:70,9
DA:71,9
DA:72,9
DA:73,9
DA:74,9
DA:75,9
DA:76,9
DA:77,9
DA:78,9
DA:79,9
DA:80,9
DA:83,9
DA:84,9
DA:85,9
DA:86,9
DA:87,9
DA:88,9
DA:89,9
DA:90,9
DA:91,9
DA:92,9
DA:93,9
DA:94,9
DA:95,9
DA:96,9
DA:97,9
DA:98,9
DA:101,9
DA:102,9
DA:103,9
DA:104,9
DA:105,9
DA:106,9
DA:107,9
DA:108,9
DA:109,9
DA:110,9
DA:111,9
DA:112,9
DA:113,9
DA:114,9
DA:115,9
DA:116,9
DA:118,9
DA:126,1
DA:128,7
DA:129,7
DA:131,334
DA:134,7
DA:136,28
DA:140,28
DA:143,7
DA:145,7
DA:148,112
DA:153,7
DA:156,1
DA:157,1
end_of_record
SF:lib/hasher.md5.js
DA:1,2
DA:3,1
DA:5,1
DA:7,1
DA:14,1
DA:16,1
DA:17,7
DA:18,7
DA:20,1
DA:22,1
DA:24,1
DA:25,1
DA:31,1
DA:34,1
DA:40,1
DA:42,64
DA:46,1
DA:47,144
DA:49,1
DA:50,144
DA:52,1
DA:53,144
DA:55,1
DA:56,144
DA:58,1
DA:59,576
DA:62,1
DA:64,9
DA:65,9
DA:66,9
DA:67,9
DA:70,9
DA:71,9
DA:72,9
DA:73,9
DA:74,9
DA:75,9
DA:76,9
DA:77,9
DA:78,9
DA:79,9
DA:80,9
DA:81,9
DA:82,9
DA:83,9
DA:84,9
DA:85,9
DA:88,9
DA:89,9
DA:90,9
DA:91,9
DA:92,9
DA:93,9
DA:94,9
DA:95,9
DA:96,9
DA:97,9
DA:98,9
DA:99,9
DA:100,9
DA:101,9
DA:102,9
DA:103,9
DA:106,9
DA:107,9
DA:108,9
DA:109,9
DA:110,9
DA:111,9
DA:112,9
DA:113,9
DA:114,9
DA:115,9
DA:116,9
DA:117,9
DA:118,9
DA:119,9
DA:120,9
DA:121,9
DA:124,9
DA:125,9
DA:126,9
DA:127,9
DA:128,9
DA:129,9
DA:130,9
DA:131,9
DA:132,9
DA:133,9
DA:134,9
DA:135,9
DA:136,9
DA:137,9
DA:138,9
DA:139,9
DA:141,9
DA:149,1
DA:151,7
DA:152,7
DA:154,334
DA:157,7
DA:159,28
DA:163,28
DA:166,7
DA:168,7
DA:171,112
DA:176,7
DA:179,1
DA:180,1
end_of_record
SF:lib/hasher.sha0.js
DA:1,2
DA:3,1
DA:5,1
DA:7,1
DA:14,1
DA:16,1
DA:17,4
DA:18,4
DA:20,1
DA:22,1
DA:24,1
DA:25,1
DA:28,1
DA:30,1
DA:32,1
DA:34,6
DA:35,6
DA:36,6
DA:37,6
DA:38,6
DA:39,6
DA:44,96
DA:46,384
DA:49,480
DA:51,120
DA:53,120
DA:55,120
DA:57,120
DA:59,480
DA:60,480
DA:61,480
DA:62,480
DA:63,480
DA:66,6
DA:67,6
DA:68,6
DA:69,6
DA:70,6
DA:73,1
DA:75,4
DA:76,4
DA:78,231
DA:81,4
DA:83,16
DA:86,16
DA:88,4
DA:90,4
DA:93,80
DA:98,4
DA:101,1
DA:102,1
end_of_record
SF:lib/hasher.sha1.js
DA:1,2
DA:3,1
DA:5,1
DA:7,1
DA:14,1
DA:16,1
DA:17,4
DA:18,4
DA:20,1
DA:22,1
DA:24,1
DA:25,1
DA:28,1
DA:30,1
DA:32,1
DA:34,15
DA:35,15
DA:36,15
DA:37,15
DA:38,15
DA:39,15
DA:44,240
DA:46,960
DA:49,1200
DA:51,300
DA:53,300
DA:55,300
DA:57,300
DA:59,1200
DA:60,1200
DA:61,1200
DA:62,1200
DA:63,1200
DA:66,15
DA:67,15
DA:68,15
DA:69,15
DA:70,15
DA:73,1
DA:75,4
DA:76,4
DA:78,229
DA:81,4
DA:83,16
DA:86,16
DA:88,4
DA:90,4
DA:93,80
DA:98,4
DA:101,1
DA:102,1
end_of_record
SF:lib/hasher.sha256.js
DA:1,2
DA:3,1
DA:5,1
DA:7,1
DA:14,1
DA:16,1
DA:17,8
DA:19,4
DA:22,4
DA:26,1
DA:28,1
DA:30,1
DA:31,1
DA:37,1
DA:40,1
DA:50,1
DA:52,1
DA:54,30
DA:55,30
DA:56,30
DA:57,30
DA:58,30
DA:59,30
DA:60,30
DA:61,30
DA:62,30
DA:67,480
DA:69,1440
DA:81,1920
DA:83,1920
DA:85,1920
DA:86,1920
DA:87,1920
DA:88,1920
DA:89,1920
DA:90,1920
DA:91,1920
DA:92,1920
DA:95,30
DA:96,30
DA:97,30
DA:98,30
DA:99,30
DA:100,30
DA:101,30
DA:102,30
DA:105,1
DA:107,8
DA:108,8
DA:110,458
DA:113,8
DA:115,32
DA:118,32
DA:120,8
DA:122,8
DA:125,240
DA:130,8
DA:133,1
DA:134,1
DA:135,1
end_of_record
./node_modules/.bin/mocha -r jscoverage -R mocha-lcov-reporter test| ./node_modules/.bin/codacy-coverage -d
Result:
[info] "2015-12-08T23:21:18.025Z" 'Started with: token [undefined], commitId [undefined], endpoint [undefined], format [undefined], path prefix [undefined], verbose [undefined], debug [true]'
[trace] "2015-12-08T23:21:18.287Z" 'Got chunk'
[trace] "2015-12-08T23:21:18.289Z" 'Got chunk'
[trace] "2015-12-08T23:21:18.289Z" 'Got chunk'
[trace] "2015-12-08T23:21:18.290Z" 'Got chunk'
[trace] "2015-12-08T23:21:18.290Z" 'Got chunk'
[trace] "2015-12-08T23:21:18.290Z" 'Got chunk'
[trace] "2015-12-08T23:21:18.290Z" 'Got chunk'
[trace] "2015-12-08T23:21:18.290Z" 'Got chunk'
[trace] "2015-12-08T23:21:18.291Z" 'Got chunk'
[trace] "2015-12-08T23:21:18.291Z" 'Got chunk'
[trace] "2015-12-08T23:21:18.291Z" 'Got chunk'
[trace] "2015-12-08T23:21:18.291Z" 'Got chunk'
[trace] "2015-12-08T23:21:18.291Z" 'Got chunk'
[trace] "2015-12-08T23:21:18.291Z" 'Got chunk'
[trace] "2015-12-08T23:21:18.292Z" 'Got chunk'
[trace] "2015-12-08T23:21:18.293Z" 'Got chunk'
[trace] "2015-12-08T23:21:18.293Z" 'Got chunk'
[trace] "2015-12-08T23:21:18.293Z" 'Got chunk'
[trace] "2015-12-08T23:21:18.293Z" 'Got chunk'
[trace] "2015-12-08T23:21:18.294Z" 'Got chunk'
[trace] "2015-12-08T23:21:18.294Z" 'Got chunk'
[trace] "2015-12-08T23:21:18.294Z" 'Got chunk'
[trace] "2015-12-08T23:21:18.294Z" 'Got chunk'
[trace] "2015-12-08T23:21:18.294Z" 'Got chunk'
[trace] "2015-12-08T23:21:18.294Z" 'Got chunk'
[trace] "2015-12-08T23:21:18.294Z" 'Got chunk'
[trace] "2015-12-08T23:21:18.295Z" 'Got chunk'
[trace] "2015-12-08T23:21:18.295Z" 'Got chunk'
[trace] "2015-12-08T23:21:18.295Z" 'Got chunk'
[trace] "2015-12-08T23:21:18.295Z" 'Got chunk'
[trace] "2015-12-08T23:21:18.295Z" 'Got chunk'
[trace] "2015-12-08T23:21:18.295Z" 'Got chunk'
[trace] "2015-12-08T23:21:18.295Z" 'Got chunk'
[trace] "2015-12-08T23:21:18.295Z" 'Got chunk'
[trace] "2015-12-08T23:21:18.296Z" 'Got chunk'
[trace] "2015-12-08T23:21:18.296Z" 'Got chunk'
[trace] "2015-12-08T23:21:18.296Z" 'Got chunk'
[trace] "2015-12-08T23:21:18.296Z" 'Got chunk'
[trace] "2015-12-08T23:21:18.296Z" 'Got chunk'
[trace] "2015-12-08T23:21:18.297Z" 'Got chunk'
[trace] "2015-12-08T23:21:18.297Z" 'Got chunk'
[trace] "2015-12-08T23:21:18.297Z" 'Got chunk'
[trace] "2015-12-08T23:21:18.297Z" 'Got chunk'
[trace] "2015-12-08T23:21:18.297Z" 'Got chunk'
[trace] "2015-12-08T23:21:18.297Z" 'Got chunk'
[trace] "2015-12-08T23:21:18.297Z" 'Got chunk'
[trace] "2015-12-08T23:21:18.297Z" 'Got chunk'
[trace] "2015-12-08T23:21:18.298Z" 'Got chunk'
[trace] "2015-12-08T23:21:18.298Z" 'Got chunk'
[trace] "2015-12-08T23:21:18.298Z" 'Got chunk'
[trace] "2015-12-08T23:21:18.298Z" 'Got chunk'
[trace] "2015-12-08T23:21:18.299Z" 'Got chunk'
[trace] "2015-12-08T23:21:18.299Z" 'Got chunk'
[trace] "2015-12-08T23:21:18.299Z" 'Got chunk'
[trace] "2015-12-08T23:21:18.299Z" 'Got chunk'
[trace] "2015-12-08T23:21:18.300Z" 'Got chunk'
[trace] "2015-12-08T23:21:18.300Z" 'Got chunk'
[trace] "2015-12-08T23:21:18.301Z" 'Got chunk'
[trace] "2015-12-08T23:21:18.301Z" 'Got chunk'
[trace] "2015-12-08T23:21:18.309Z" 'Received file through stdin'
[info] "2015-12-08T23:21:18.309Z" 'Handling input for: token ["TOKEN"], commitId [undefined], endpoint [undefined], format ["lcov"], path prefix [""], verbose [undefined], debug [true]'
[debug] "2015-12-08T23:21:18.321Z" 'Parsing Lcov Data'
[trace] "2015-12-08T23:21:18.340Z" 'Successfully parsed lib/crypto-api.js'
[trace] "2015-12-08T23:21:18.341Z" 'Successfully parsed lib/enc.hex.js'
[trace] "2015-12-08T23:21:18.341Z" 'Successfully parsed lib/hasher.md2.js'
[trace] "2015-12-08T23:21:18.341Z" 'Successfully parsed lib/hasher.md4.js'
[trace] "2015-12-08T23:21:18.341Z" 'Successfully parsed lib/hasher.md5.js'
[trace] "2015-12-08T23:21:18.342Z" 'Successfully parsed lib/hasher.sha0.js'
[trace] "2015-12-08T23:21:18.342Z" 'Successfully parsed lib/hasher.sha1.js'
[trace] "2015-12-08T23:21:18.342Z" 'Successfully parsed lib/hasher.sha256.js'
[debug] "2015-12-08T23:21:18.342Z" 'Successfully Parsed Lcov Data'
[trace] "2015-12-08T23:21:18.348Z" { total: 0,
fileReports:
[ { filename: 'lib/crypto-api.js', coverage: [Object], total: 0 },
{ filename: 'lib/enc.hex.js', coverage: [Object], total: 0 },
{ filename: 'lib/hasher.md2.js', coverage: [Object], total: 0 },
{ filename: 'lib/hasher.md4.js', coverage: [Object], total: 0 },
{ filename: 'lib/hasher.md5.js', coverage: [Object], total: 0 },
{ filename: 'lib/hasher.sha0.js', coverage: [Object], total: 0 },
{ filename: 'lib/hasher.sha1.js', coverage: [Object], total: 0 },
{ filename: 'lib/hasher.sha256.js',
coverage: [Object],
total: 0 } ] }
[debug] "2015-12-08T23:21:18.352Z" 'Sending coverage'
[debug] "2015-12-08T23:21:18.690Z" 'Successfully sent coverage'
Why all results 0? What I'm doing wrong?
I am a little confused on how the CODACY_PROJECT_TOKEN could be kept secret when integrating with a public CI server like travis-ci.
I am using latest [email protected], [email protected], [email protected] and the following command to send coverage report: cat ${__SRC_PATH}"/coverage/lcov.info" | codacy-coverage --debug
To gather coverage I run cmd below:
babel-node `which isparta` cover --include 'lib/**/*.js' `which _mocha` -- 'test/**/*.spec.js' --reporter spec --ui tdd --recursive --timeout 20s
Result of sending coverage:
[info] "2016-02-16T13:53:47.353Z" 'Started with: token [undefined], commitId [undefined], endpoint [undefined], format [undefined], path prefix [undefined], verbose [undefined], debug [true]'
[trace] "2016-02-16T13:53:47.358Z" 'Got chunk'
[trace] "2016-02-16T13:53:47.359Z" 'Got chunk'
[trace] "2016-02-16T13:53:47.361Z" 'Received file through stdin'
[info] "2016-02-16T13:53:47.361Z" 'Handling input for: token ["TOKEN"], commitId [undefined], endpoint [undefined], format ["lcov"], path prefix [""], verbose [undefined], debug [true]'
[debug] "2016-02-16T13:53:47.367Z" 'Parsing Lcov Data'
[trace] "2016-02-16T13:53:47.390Z" 'Successfully parsed /home/travis/build/MitocGroup/deepify/src/lib/Helpers/Exec.js'
[trace] "2016-02-16T13:53:47.390Z" 'Successfully parsed /home/travis/build/MitocGroup/deepify/src/lib/Helpers/LambdasExtractor.js'
[trace] "2016-02-16T13:53:47.391Z" 'Successfully parsed /home/travis/build/MitocGroup/deepify/src/lib/Helpers/ValidationSchemasSync.js'
[trace] "2016-02-16T13:53:47.391Z" 'Successfully parsed /home/travis/build/MitocGroup/deepify/src/lib/Lambda/ForksManager.js'
[trace] "2016-02-16T13:53:47.391Z" 'Successfully parsed /home/travis/build/MitocGroup/deepify/src/lib/Lambda/Runtime.js'
[trace] "2016-02-16T13:53:47.391Z" 'Successfully parsed /home/travis/build/MitocGroup/deepify/src/lib/Lambda/Thread.js'
[trace] "2016-02-16T13:53:47.391Z" 'Successfully parsed /home/travis/build/MitocGroup/deepify/src/lib/Lambda/Exception/LambdaExecutionException.js'
[trace] "2016-02-16T13:53:47.391Z" 'Successfully parsed /home/travis/build/MitocGroup/deepify/src/lib/Lambda/Exception/Exception.js'
[trace] "2016-02-16T13:53:47.392Z" 'Successfully parsed /home/travis/build/MitocGroup/deepify/src/lib/Exception/Exception.js'
[trace] "2016-02-16T13:53:47.392Z" 'Successfully parsed /home/travis/build/MitocGroup/deepify/src/lib/Lambda/Timer.js'
[trace] "2016-02-16T13:53:47.392Z" 'Successfully parsed /home/travis/build/MitocGroup/deepify/src/lib/NodeJS/Bin.js'
[trace] "2016-02-16T13:53:47.393Z" 'Successfully parsed /home/travis/build/MitocGroup/deepify/src/lib/NodeJS/DepsTreeOptimizer.js'
[trace] "2016-02-16T13:53:47.393Z" 'Successfully parsed /home/travis/build/MitocGroup/deepify/src/lib/NodeJS/NpmShrinkwrap.js'
[trace] "2016-02-16T13:53:47.393Z" 'Successfully parsed /home/travis/build/MitocGroup/deepify/src/lib/NodeJS/NpmInstall.js'
[trace] "2016-02-16T13:53:47.393Z" 'Successfully parsed /home/travis/build/MitocGroup/deepify/src/lib/NodeJS/NpmDependency.js'
[trace] "2016-02-16T13:53:47.393Z" 'Successfully parsed /home/travis/build/MitocGroup/deepify/src/lib/NodeJS/UndefinedDepsResolver.js'
[trace] "2016-02-16T13:53:47.393Z" 'Successfully parsed /home/travis/build/MitocGroup/deepify/src/lib/NodeJS/PackageVersionResolver.js'
[trace] "2016-02-16T13:53:47.394Z" 'Successfully parsed /home/travis/build/MitocGroup/deepify/src/lib/NodeJS/NpmChain.js'
[trace] "2016-02-16T13:53:47.394Z" 'Successfully parsed /home/travis/build/MitocGroup/deepify/src/lib/NodeJS/NpmLink.js'
[trace] "2016-02-16T13:53:47.394Z" 'Successfully parsed /home/travis/build/MitocGroup/deepify/src/lib/NodeJS/NpmUpdate.js'
[trace] "2016-02-16T13:53:47.394Z" 'Successfully parsed /home/travis/build/MitocGroup/deepify/src/lib/NodeJS/NpmDedupe.js'
[trace] "2016-02-16T13:53:47.394Z" 'Successfully parsed /home/travis/build/MitocGroup/deepify/src/lib/NodeJS/NpmInstallLibs.js'
[trace] "2016-02-16T13:53:47.394Z" 'Successfully parsed /home/travis/build/MitocGroup/deepify/src/lib/NodeJS/NpmListDependencies.js'
[trace] "2016-02-16T13:53:47.394Z" 'Successfully parsed /home/travis/build/MitocGroup/deepify/src/lib/NodeJS/Exception/NpmDepsListException.js'
[trace] "2016-02-16T13:53:47.395Z" 'Successfully parsed /home/travis/build/MitocGroup/deepify/src/lib/NodeJS/Exception/Exception.js'
[trace] "2016-02-16T13:53:47.395Z" 'Successfully parsed /home/travis/build/MitocGroup/deepify/src/lib/NodeJS/NpmPrune.js'
[trace] "2016-02-16T13:53:47.395Z" 'Successfully parsed /home/travis/build/MitocGroup/deepify/src/lib/NodeJS/NpmRun.js'
[trace] "2016-02-16T13:53:47.395Z" 'Successfully parsed /home/travis/build/MitocGroup/deepify/src/lib/NodeJS/NpmUninstallLibs.js'
[trace] "2016-02-16T13:53:47.395Z" 'Successfully parsed /home/travis/build/MitocGroup/deepify/src/lib/Server/Hook.js'
[trace] "2016-02-16T13:53:47.395Z" 'Successfully parsed /home/travis/build/MitocGroup/deepify/src/lib/Server/Instance.js'
[trace] "2016-02-16T13:53:47.396Z" 'Successfully parsed /home/travis/build/MitocGroup/deepify/src/lib/Server/Exception/PropertyObjectRequiredException.js'
[trace] "2016-02-16T13:53:47.396Z" 'Successfully parsed /home/travis/build/MitocGroup/deepify/src/lib/Server/Exception/Exception.js'
[trace] "2016-02-16T13:53:47.396Z" 'Successfully parsed /home/travis/build/MitocGroup/deepify/src/lib/Server/Exception/FailedToStartServerException.js'
[trace] "2016-02-16T13:53:47.396Z" 'Successfully parsed /home/travis/build/MitocGroup/deepify/src/lib/Terminal/Argument.js'
[trace] "2016-02-16T13:53:47.396Z" 'Successfully parsed /home/travis/build/MitocGroup/deepify/src/lib/Terminal/Arguments.js'
[trace] "2016-02-16T13:53:47.396Z" 'Successfully parsed /home/travis/build/MitocGroup/deepify/src/lib/Terminal/Exception/ArgumentObjectRequiredException.js'
[trace] "2016-02-16T13:53:47.396Z" 'Successfully parsed /home/travis/build/MitocGroup/deepify/src/lib/Terminal/Exception/Exception.js'
[trace] "2016-02-16T13:53:47.397Z" 'Successfully parsed /home/travis/build/MitocGroup/deepify/src/lib/Terminal/Exception/ArgumentsObjectRequiredException.js'
[trace] "2016-02-16T13:53:47.397Z" 'Successfully parsed /home/travis/build/MitocGroup/deepify/src/lib/Terminal/Exception/MissingArgumentException.js'
[trace] "2016-02-16T13:53:47.397Z" 'Successfully parsed /home/travis/build/MitocGroup/deepify/src/lib/Terminal/Exception/ValidationException.js'
[trace] "2016-02-16T13:53:47.397Z" 'Successfully parsed /home/travis/build/MitocGroup/deepify/src/lib/Terminal/Help.js'
[trace] "2016-02-16T13:53:47.397Z" 'Successfully parsed /home/travis/build/MitocGroup/deepify/src/lib/Terminal/Program.js'
[trace] "2016-02-16T13:53:47.397Z" 'Successfully parsed /home/travis/build/MitocGroup/deepify/src/lib/Terminal/Options.js'
[trace] "2016-02-16T13:53:47.398Z" 'Successfully parsed /home/travis/build/MitocGroup/deepify/src/lib/Terminal/Option.js'
[trace] "2016-02-16T13:53:47.398Z" 'Successfully parsed /home/travis/build/MitocGroup/deepify/src/lib/Terminal/Exception/OptionObjectRequiredException.js'
[trace] "2016-02-16T13:53:47.398Z" 'Successfully parsed /home/travis/build/MitocGroup/deepify/src/lib/Terminal/Exception/OptionsObjectRequiredException.js'
[trace] "2016-02-16T13:53:47.398Z" 'Successfully parsed /home/travis/build/MitocGroup/deepify/src/lib/Terminal/Exception/MissingOptionException.js'
[trace] "2016-02-16T13:53:47.398Z" 'Successfully parsed /home/travis/build/MitocGroup/deepify/src/lib/Terminal/Exception/ProgramInstanceRequiredException.js'
[trace] "2016-02-16T13:53:47.398Z" 'Successfully parsed /home/travis/build/MitocGroup/deepify/src/lib/Terminal/Exception/InvalidActionException.js'
[trace] "2016-02-16T13:53:47.398Z" 'Successfully parsed /home/travis/build/MitocGroup/deepify/src/lib/Terminal/Exception/UnknownOptionException.js'
[trace] "2016-02-16T13:53:47.399Z" 'Successfully parsed /home/travis/build/MitocGroup/deepify/src/lib/Terminal/Prompt.js'
[debug] "2016-02-16T13:53:47.399Z" 'Successfully Parsed Lcov Data'
[trace] "2016-02-16T13:53:47.401Z" { total: 60,
fileReports:
[ { filename: 'src/lib/Helpers/Exec.js',
coverage: [Object],
total: 100 },
{ filename: 'src/lib/Helpers/LambdasExtractor.js',
coverage: [Object],
total: 45 },
{ filename: 'src/lib/Helpers/ValidationSchemasSync.js',
coverage: [Object],
total: 5 },
{ filename: 'src/lib/Lambda/ForksManager.js',
coverage: [Object],
total: 85 },
{ filename: 'src/lib/Lambda/Runtime.js',
coverage: [Object],
total: 70 },
{ filename: 'src/lib/Lambda/Thread.js',
coverage: [Object],
total: 69 },
{ filename: 'src/lib/Lambda/Exception/LambdaExecutionException.js',
coverage: [Object],
total: 100 },
{ filename: 'src/lib/Lambda/Exception/Exception.js',
coverage: [Object],
total: 100 },
{ filename: 'src/lib/Exception/Exception.js',
coverage: [Object],
total: 100 },
{ filename: 'src/lib/Lambda/Timer.js',
coverage: [Object],
total: 100 },
{ filename: 'src/lib/NodeJS/Bin.js',
coverage: [Object],
total: 78 },
{ filename: 'src/lib/NodeJS/DepsTreeOptimizer.js',
coverage: [Object],
total: 1 },
{ filename: 'src/lib/NodeJS/NpmShrinkwrap.js',
coverage: [Object],
total: 100 },
{ filename: 'src/lib/NodeJS/NpmInstall.js',
coverage: [Object],
total: 44 },
{ filename: 'src/lib/NodeJS/NpmDependency.js',
coverage: [Object],
total: 27 },
{ filename: 'src/lib/NodeJS/UndefinedDepsResolver.js',
coverage: [Object],
total: 14 },
{ filename: 'src/lib/NodeJS/PackageVersionResolver.js',
coverage: [Object],
total: 34 },
{ filename: 'src/lib/NodeJS/NpmChain.js',
coverage: [Object],
total: 35 },
{ filename: 'src/lib/NodeJS/NpmLink.js',
coverage: [Object],
total: 100 },
{ filename: 'src/lib/NodeJS/NpmUpdate.js',
coverage: [Object],
total: 100 },
{ filename: 'src/lib/NodeJS/NpmDedupe.js',
coverage: [Object],
total: 100 },
{ filename: 'src/lib/NodeJS/NpmInstallLibs.js',
coverage: [Object],
total: 100 },
{ filename: 'src/lib/NodeJS/NpmListDependencies.js',
coverage: [Object],
total: 92 },
{ filename: 'src/lib/NodeJS/Exception/NpmDepsListException.js',
coverage: [Object],
total: 66 },
{ filename: 'src/lib/NodeJS/Exception/Exception.js',
coverage: [Object],
total: 100 },
{ filename: 'src/lib/NodeJS/NpmPrune.js',
coverage: [Object],
total: 100 },
{ filename: 'src/lib/NodeJS/NpmRun.js',
coverage: [Object],
total: 100 },
{ filename: 'src/lib/NodeJS/NpmUninstallLibs.js',
coverage: [Object],
total: 100 },
{ filename: 'src/lib/Server/Hook.js',
coverage: [Object],
total: 87 },
{ filename: 'src/lib/Server/Instance.js',
coverage: [Object],
total: 44 },
{ filename: 'src/lib/Server/Exception/PropertyObjectRequiredException.js',
coverage: [Object],
total: 100 },
{ filename: 'src/lib/Server/Exception/Exception.js',
coverage: [Object],
total: 100 },
{ filename: 'src/lib/Server/Exception/FailedToStartServerException.js',
coverage: [Object],
total: 66 },
{ filename: 'src/lib/Terminal/Argument.js',
coverage: [Object],
total: 96 },
{ filename: 'src/lib/Terminal/Arguments.js',
coverage: [Object],
total: 90 },
{ filename: 'src/lib/Terminal/Exception/ArgumentObjectRequiredException.js',
coverage: [Object],
total: 100 },
{ filename: 'src/lib/Terminal/Exception/Exception.js',
coverage: [Object],
total: 100 },
{ filename: 'src/lib/Terminal/Exception/ArgumentsObjectRequiredException.js',
coverage: [Object],
total: 100 },
{ filename: 'src/lib/Terminal/Exception/MissingArgumentException.js',
coverage: [Object],
total: 80 },
{ filename: 'src/lib/Terminal/Exception/ValidationException.js',
coverage: [Object],
total: 83 },
{ filename: 'src/lib/Terminal/Help.js',
coverage: [Object],
total: 92 },
{ filename: 'src/lib/Terminal/Program.js',
coverage: [Object],
total: 80 },
{ filename: 'src/lib/Terminal/Options.js',
coverage: [Object],
total: 93 },
{ filename: 'src/lib/Terminal/Option.js',
coverage: [Object],
total: 97 },
{ filename: 'src/lib/Terminal/Exception/OptionObjectRequiredException.js',
coverage: [Object],
total: 100 },
{ filename: 'src/lib/Terminal/Exception/OptionsObjectRequiredException.js',
coverage: [Object],
total: 100 },
{ filename: 'src/lib/Terminal/Exception/MissingOptionException.js',
coverage: [Object],
total: 87 },
{ filename: 'src/lib/Terminal/Exception/ProgramInstanceRequiredException.js',
coverage: [Object],
total: 100 },
{ filename: 'src/lib/Terminal/Exception/InvalidActionException.js',
coverage: [Object],
total: 100 },
{ filename: 'src/lib/Terminal/Exception/UnknownOptionException.js',
coverage: [Object],
total: 100 },
{ filename: 'src/lib/Terminal/Prompt.js',
coverage: [Object],
total: 100 } ] }
[debug] "2016-02-16T13:53:47.419Z" 'Sending coverage'
[debug] "2016-02-16T13:53:47.855Z" 'Successfully sent coverage'
Result on codacy coverage page without any changes after refreshing with different intervals 10sec, 1min, 10 min, 1 hr and so on
:
Hang in there! We have received your coverage report but we are still analysing the commit. Refresh in a few seconds.
The issue is reproducible for deep-package-manager and deepify projects.
I use secured environment variable from travis for to store CODACY_PROJECT_TOKEN.
Windows 10
Jest
It should work on Windows
cat
and |
don't exist on Windows.
Also, when just using yarn codacy-coverage
, it just stalls, nothing happens for at least 10 minutes (then I just killed it)
Add the following script to package.json
:
"codacy": "cat ./test/unit/coverage/lcov.info | codacy-coverage"
Run yarn codacy
on Windows 10
I don't understand why the readme is so hard to understand. I am not a user of node js, nor npm. Perhpas that is it. However something "theoritically" so simple and I don't get it how the "publisher" of a report to codacy can be so complicated.
I did
the error is
./node_modules/.bin/codacy-coverage: line 1: syntax error near unexpected token
newline'
./node_modules/.bin/codacy-coverage: line 1: <!doctype html>'
Hi, I'm using your library and I've just been notified about security issue in one of your non-direct dependencies - hoek
library.
It is used by your direct deps:
topo
joi
hawk
I've just checked them and for all of them there are newer versions which fixed this security issue.
Could you please upgrade deps and make a new release?
Thanks!
Hi, I have generated my test coverage using jest --coverage command. But I am lost at sending them to codacy. Can anyone help me out with the exact steps I have to do to send the coverage to codacy ?
I had everything working fine, I was seeing coverage updates and a chart by commits, then I noticed that the chart now says no data.
I guess I should also mention that I'm not seeing other things in the charts either like issues. Those were working as well and everything just stopped all at once.
In looking at travis-ci logs, I can see that coverage was generated and registered 100%, but now it no longer is getting submitted successfully by codacy-coverage module. I can see that the CODACY_PROJECT_TOKEN is still set in my travis environment variables.
I don't believe that anything changed regarding how I am doing coverage and how things are being submitted to codacy.
Can you help me understand what is broken with my project?
https://www.codacy.com/app/jeff-barczewski/redux-logic/dashboard
My npm script that is executed on travis is:
"test:cov-codacy": "cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text mocha test --recursive && cat coverage/lcov.info | codacy-coverage",
The output from the run is below:
... passing test output snipped
128 passing (1s)
--------------------------|----------|----------|----------|----------|----------------|
File | % Stmts | % Branch | % Funcs | % Lines |Uncovered Lines |
--------------------------|----------|----------|----------|----------|----------------|
All files | 100 | 100 | 100 | 100 | |
createLogic.js | 100 | 100 | 100 | 100 | |
createLogicAction$.js | 100 | 100 | 100 | 100 | |
createLogicMiddleware.js | 100 | 100 | 100 | 100 | |
index.js | 100 | 100 | 100 | 100 | |
logicWrapper.js | 100 | 100 | 100 | 100 | |
--------------------------|----------|----------|----------|----------|----------------|
[error] "2016-08-14T04:33:11.911Z" 'Status Code [404] - Error [{"error":"not found"}]'
[error] "2016-08-14T04:33:11.913Z" 'Error sending coverage'
[error] "2016-08-14T04:33:11.913Z" Error: Expected Successful Status Code, but got [404]
at /home/travis/build/jeffbski/redux-logic/node_modules/codacy-coverage/lib/reporter.js:70:35
at tryCatcher (/home/travis/build/jeffbski/redux-logic/node_modules/bluebird/js/main/util.js:26:23)
at Promise._settlePromiseFromHandler (/home/travis/build/jeffbski/redux-logic/node_modules/bluebird/js/main/promise.js:507:31)
at Promise._settlePromiseAt (/home/travis/build/jeffbski/redux-logic/node_modules/bluebird/js/main/promise.js:581:18)
at Promise._settlePromises (/home/travis/build/jeffbski/redux-logic/node_modules/bluebird/js/main/promise.js:697:14)
at Async._drainQueue (/home/travis/build/jeffbski/redux-logic/node_modules/bluebird/js/main/async.js:123:16)
at Async._drainQueues (/home/travis/build/jeffbski/redux-logic/node_modules/bluebird/js/main/async.js:133:10)
at Immediate.Async.drainQueues (/home/travis/build/jeffbski/redux-logic/node_modules/bluebird/js/main/async.js:15:14)
at runCallback (timers.js:570:20)
at tryOnImmediate (timers.js:550:5)
at processImmediate [as _immediateCallback] (timers.js:529:5)
The command "npm run test:cov-codacy" exited with 0.
Codacy-Coverage 1.1.0 changes promise modules, exposes a method for other modules to use codacy-coverage for parsing and communication to Codacy.
None.
codacyCoverage.handleInput(input, options)
is now exposed. It allows other modules such as Grunt tasks to be able to parse coverage and send it to Codacy.
All of the promises are now created with Bluebird so feel free to use their handy functions for Promises and experience the additional performance gain from the library over Q.
The contributors to this release are: me and Sebastiaan Deckers.
Hi, my lcov
file is create by karma and I dont know how send the lcov
file as parameter to codacy-coverage.js file because there is no document for karma and codacy-coverage.
how do I use karma to codacy coverage?
Linux e2e4d9bfe136 4.9.36-moby #1 SMP Wed Jul 12 15:29:07 UTC 2017 x86_64 GNU/Linux
When code-coverage
throws an error, a non-zero value should be returned to the calling process (such as the shell under Linux) so a pipeline can fail for instance.
In case of any error, to the shell a zero "0" value is returned.
Some use cases below.
# Try to invoke with non-existing lcov file...
$ cat my_non_existing_lcov.info | codacy-coverage
cat: coverage/lcov.info1: No such file or directory
[error] "2017-08-15T18:12:26.068Z" { ValidationError: "value" is not allowed to be empty
at Object.exports.process (/usr/local/lib/node_modules/codacy-coverage/node_modules/joi/lib/errors.js:140:17)
at internals.String.internals.Any._validateWithOptions (/usr/local/lib/node_modules/codacy-coverage/node_modules/joi/lib/any.js:654:25)
at module.exports.internals.Any.root.validate (/usr/local/lib/node_modules/codacy-coverage/node_modules/joi/lib/index.js:100:23)
at /usr/local/lib/node_modules/codacy-coverage/lib/impl/lcov.js:11:37
...
$ echo $?
0
# Token incorrect
cat coverage/lcov.info | codacy-coverage
[error] "2017-08-15T18:13:51.688Z" 'Status Code [404] - Error [{"error":"not found"}]'
[error] "2017-08-15T18:13:51.691Z" 'Error sending coverage'
[error] "2017-08-15T18:13:51.691Z" Error: Expected Successful Status Code, but got [404]
at /usr/local/lib/node_modules/codacy-coverage/lib/reporter.js:101:23
$ echo $?
0
# Token not set in ENV
cat coverage/lcov.info | codacy-coverage
[error] "2017-08-15T18:14:25.391Z" 'Error sending coverage'
[error] "2017-08-15T18:14:25.393Z" Error: Token is required
$ echo $?
0
Fix security vulnerabilities:
https://github.com/codacy/node-codacy-coverage/network/alerts
Package seems to have a dependency on a version of tslib that has been removed. 1.9.2 and 1.9.10 both install correctly, but aren't acceptable for the codacy coverage package.
npm ERR! code ETARGET
npm ERR! notarget No matching version found for [email protected]
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
npm ERR! notarget
npm ERR! notarget It was specified as a dependency of '@angular/animations'
npm ERR! notarget
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.