Showing 1,896 of 2,859 total issues
File icutrim.py
has 272 lines of code (exceeds 250 allowed). Consider refactoring. Open
#!/usr/bin/python
#
# Copyright (C) 2014 IBM Corporation and Others. All Rights Reserved.
#
# @author Steven R. Loomis <srl@icu-project.org>
Function realpathSync
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
fs.realpathSync = function realpathSync(p, cache) {
// make p is absolute
p = pathModule.resolve(p);
if (cache && Object.prototype.hasOwnProperty.call(cache, p)) {
Function send
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
Socket.prototype.send = function(buffer,
offset,
length,
port,
address,
Function makeArchy_
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
function makeArchy_ (data, long, dir, depth, parent, d) {
if (typeof data === "string") {
if (depth -1 <= npm.config.get("depth")) {
// just missing
var unmet = "UNMET DEPENDENCY"
Function load_
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
function load_(builtin, rc, cli, cb) {
var defaults = configDefs.defaults
var conf = new Conf(rc)
conf.usingBuiltin = !!builtin
Function client
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
function client() {
var chunk;
switch (type) {
case 'buf':
chunk = new Buffer(len);
Function _parseMap
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
_parseMap: function(map, lineNumber, columnNumber)
{
var sourceIndex = 0;
var sourceLineNumber = 0;
var sourceColumnNumber = 0;
Function processLine
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
function processLine(text, begin, end) {
var line = text.substring(begin, end);
if (readingSource) {
if (separatorFilter.exec(line) != null) {
readingSource = false;
Function completion
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
owner.completion = function (opts, cb) {
var argv = opts.conf.argv.remain
if (argv.length > 4) return cb()
if (argv.length <= 2) {
var subs = ["add", "rm"]
Function spawnSync
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
function spawnSync(/*file, args, options*/) {
var opts = normalizeSpawnArguments.apply(null, arguments);
var options = opts.options;
- 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 finishSection
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
function finishSection(section, parent) {
if (!section || !parent) {
throw new Error('Invalid finishSection call\n'+
JSON.stringify(section) + '\n' +
JSON.stringify(parent));
- 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 highlight
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
function highlight(prefix, suffix, tag) {
var nodeList = document.getElementsByTagName(tag);
for (var i = 0; i < nodeList.length; i++) {
var element = nodeList.item(i);
var htmlClasses = sh_getClasses(element);
- 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 decode
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
QueryString.parse = QueryString.decode = function(qs, sep, eq, options) {
sep = sep || '&';
eq = eq || '=';
var obj = {};
- 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 traverseBreadthFirst
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
SplayTree.prototype.traverseBreadthFirst = function (f) {
if (f(this.root_.value)) return;
var stack = [this.root_];
var length = 1;
- 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 makeParseable_
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
function makeParseable_ (data, long, dir, depth, parent, d) {
if (data.hasOwnProperty("_found") && data._found !== true) return ""
if (typeof data === "string") {
if (data.depth < npm.config.get("depth")) {
- 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 filter
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
function filter (data, args, set, seen) {
if (!set) set = {}
if (!seen) seen = {}
if (set.hasOwnProperty(data.path)) return set
if (seen.hasOwnProperty(data.path)) return set
- 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 run
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
function run (pkg, wd, cmd, args, cb) {
if (!pkg.scripts) pkg.scripts = {}
var cmds
if (cmd === "restart" && !pkg.scripts.restart) {
- 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 search
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
function search (data, fields, version, title) {
var field
, tail = fields
while (!field && fields.length) field = tail.shift()
fields = [field].concat(tail)
- 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 findPeerInvalid_
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
function findPeerInvalid_ (packageMap, fpiList) {
if (fpiList.indexOf(packageMap) !== -1)
return undefined
fpiList.push(packageMap)
- 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 CompareParameters
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
def CompareParameters(self, params):
"""Computes the edit distance and list from the function params to the docs.
Uses the Levenshtein edit distance algorithm, with code modified from
http://en.wikibooks.org/wiki/Algorithm_implementation/Strings/Levenshtein_distance#Python
- 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"