File package-client.js
has 582 lines of code (exceeds 250 allowed). Consider refactoring. Open
var _ = require('underscore');
var config = require('../meteor-services/config.js');
var httpHelpers = require('../utils/http-helpers.js');
var release = require('./release.js');
Function publishPackage
has a Cognitive Complexity of 56 (exceeds 5 allowed). Consider refactoring. Open
exports.publishPackage = function (options) {
buildmessage.assertInJob();
var packageSource = options.packageSource;
var conn = options.connection;
var projectContext = options.projectContext;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function publishPackage
has 216 lines of code (exceeds 25 allowed). Consider refactoring. Open
exports.publishPackage = function (options) {
buildmessage.assertInJob();
var packageSource = options.packageSource;
var conn = options.connection;
var projectContext = options.projectContext;
Function _updateServerPackageData
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
var _updateServerPackageData = function (dataStore, options) {
var self = this;
options = options || {};
if (dataStore === null) {
throw Error("Data store expected");
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _updateServerPackageData
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
var _updateServerPackageData = function (dataStore, options) {
var self = this;
options = options || {};
if (dataStore === null) {
throw Error("Data store expected");
Function updatePackageMetadata
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
exports.updatePackageMetadata = function (options) {
buildmessage.assertInJob();
var packageSource = options.packageSource;
var conn = options.connection;
Function getSomeData
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
var getSomeData = function () {
var syncToken = dataStore.getSyncToken() || {format: "1.1"};
if (!start) {
start = {};
Function bundleSource
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
var bundleSource = function (isopack, includeSources, packageDir) {
buildmessage.assertInJob();
var name = isopack.name;
Function publishBuiltPackage
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
var publishBuiltPackage = function (conn, isopack, bundleResult) {
buildmessage.assertInJob();
var name = isopack.name;
var uploadInfo;
Function updatePackageMetadata
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
exports.updatePackageMetadata = function (options) {
buildmessage.assertInJob();
var packageSource = options.packageSource;
var conn = options.connection;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Avoid too many return
statements within this function. Open
return;
Avoid too many return
statements within this function. Open
return;
Avoid too many return
statements within this function. Open
return;
Avoid too many return
statements within this function. Open
return;
Avoid too many return
statements within this function. Open
return;
Avoid too many return
statements within this function. Open
return;
Avoid too many return
statements within this function. Open
return;
Avoid too many return
statements within this function. Open
return;
Avoid too many return
statements within this function. Open
return;
Avoid too many return
statements within this function. Open
return;
Avoid too many return
statements within this function. Open
return;
Avoid too many return
statements within this function. Open
return;
Avoid too many return
statements within this function. Open
return;
Avoid too many return
statements within this function. Open
return;
Avoid too many return
statements within this function. Open
return;
Avoid too many return
statements within this function. Open
return;
Avoid too many return
statements within this function. Open
return;
Avoid too many return
statements within this function. Open
return;
Avoid too many return
statements within this function. Open
return;