Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

codacy-coverage

Package Overview
Dependencies
Maintainers
2
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

codacy-coverage - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

lib/util.js

18

lib/impl/lcov.js

@@ -1,2 +0,2 @@

(function (lcovParse, Promise, Joi, logger, path) {
(function (lcovParse, Promise, Joi, logger, util, path) {
'use strict';

@@ -13,4 +13,4 @@

var validOptions = Joi.validate(options, optionsValidation, {
stripUnknown: true
});
stripUnknown: true
});
var validationError = validLcov.error || validOptions.error;

@@ -32,5 +32,5 @@

var result = {
total: 0,
fileReports: []
};
total: 0,
fileReports: []
};
var totalLines = 0;

@@ -51,3 +51,3 @@ var totalHits = 0;

// The API uses integers only, so convert accordingly.
fileStats.total = Math.floor((stats.lines.hit / stats.lines.found) * 100);
fileStats.total = Math.floor(util.safeDivision(stats.lines.hit, stats.lines.found) * 100);

@@ -68,3 +68,3 @@ //TODO: Convert to reduce function

// The API uses integers only, so convert accordingly.
result.total = Math.floor((totalHits / totalLines) * 100);
result.total = Math.floor(util.safeDivision(totalHits, totalLines) * 100);

@@ -78,2 +78,2 @@ logger.debug('Successfully Parsed Lcov Data');

};
}(require('lcov-parse'), require('bluebird'), require('joi'), require('../logger')(), require('path')));
}(require('lcov-parse'), require('bluebird'), require('joi'), require('../logger')(), require('../util'), require('path')));
{
"name": "codacy-coverage",
"version": "1.1.0",
"version": "1.1.1",
"description": "Code Coverage reporter for Codacy.com",

@@ -5,0 +5,0 @@ "keywords": [

@@ -96,3 +96,3 @@ (function (fs, parser, helper, path) {

expect(JSON.stringify(data)).to.equal(JSON.stringify({
total: null,
total: 0,
fileReports: [

@@ -102,3 +102,3 @@ {

coverage: {},
total: null
total: 0
}

@@ -114,3 +114,3 @@ ]

expect(JSON.stringify(data)).to.equal(JSON.stringify({
total: null,
total: 0,
fileReports: [

@@ -120,3 +120,3 @@ {

coverage: {},
total: null
total: 0
}

@@ -123,0 +123,0 @@ ]

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc