Showing 206 of 270 total issues
Function create
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
Request.prototype.create = function () {
var opts = { agent: this.agent, xdomain: this.xd, xscheme: this.xs, enablesXDR: this.enablesXDR };
// SSL options for Node.js client
opts.pfx = this.pfx;
Function exports
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function(responderId, config, ss) {
var code, name;
name = config && config.name || 'rpc';
// Serve client code
Function exports
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function(ss, router, options) {
return {
plan: function(args) {
var plan = {}, httpServer = args[0];
Function exports
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function() {
return {
transport: require('./transport')(),
/**
- 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 exports
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function(ss, options) {
//set default timings
if (!options.onChange) {options.onChange = {};} // dubious side effect here
if (!options.onChange.delayTime) {options.onChange.delayTime = 100;}
- 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 Socket
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
function Socket(uri, opts) {
if (!(this instanceof Socket)) return new Socket(uri, opts);
opts = opts || {};
Function allowAnywhereFoldCaseAndRenumberGroups
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
function allowAnywhereFoldCaseAndRenumberGroups(regex) {
// Split into character sets, escape sequences, punctuation strings
// like ('(', '(?:', ')', '^'), and runs of characters that do not
// include any of the above.
var parts = regex.source.match(
Function exports
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function(ss, middleware) {
var api, dir, request;
dir = pathlib.join(ss.root, 'server/rpc');
api = apiTree.createApiTree(dir);
return (request = function(req, res) {
Function exports
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function(ss) {
/*
* Require a module by id that is located.
* - builtin module in context
* - module relative to app.js
- 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 controller
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
controller: ['$scope', '$element', function($scope, $element) {
var navTabs = $element.contents().eq(0),
ngModel = $element.controller('ngModel') || {},
tabs = [],
selectedTab;
Function emit
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
EventEmitter.prototype.emit = function() {
this._events || init.call(this);
var type = arguments[0];
Function exports
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function(ss, messageEmitter, httpServer, config, sessionOptions){
config = config || {};
config.server = config.server || {};
config.client = config.client || {};
Function decorate
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
var decorate = function (job) {
var sourceCode = job.sourceCode, basePos = job.basePos;
/** Even entries are positions in source in ascending order. Odd enties
* are style markers (e.g., PR_COMMENT) that run from that position until
* the end.
Function interfaces
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
interfaces: function(middleware) {
// Get request handler
var request;
request = require('./request')(ss, middleware);
Function exports
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function(ss, messageEmitter, httpServer, config, sessionOptions){
config = config || {};
config.server = config.server || {};
config.client = config.client || {};
- 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 marked
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
function marked(src, opt, callback) {
if (callback || typeof opt === 'function') {
if (!callback) {
callback = opt;
opt = null;
Function exports
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function() {
return {
transport: require('./transport')(),
/**
Function entries
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
entries: function entries(client, assetType) {
var _entries = [],
bundler = getBundler(client),
includeType,
Function doWork
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
function doWork() {
var endTime = (win['PR_SHOULD_USE_CONTINUATION'] ?
clock['now']() + 250 /* ms */ :
Infinity);
for (; k < elements.length && clock['now']() < endTime; k++) {
Function docsPathWatchAction
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
$scope.$watch(function docsPathWatch() {return $location.path(); }, function docsPathWatchAction(path) {
var parts = path.split('/'),
sectionId = parts[1],
partialId = parts[2],
page, sectionName = $scope.sections[(NG_DOCS.html5Mode ? '' : '#/') + sectionId];