Showing 1,896 of 2,859 total issues
Function processStdio
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
startup.processStdio = function() {
var stdin, stdout, stderr;
process.__defineGetter__('stdout', function() {
if (stdout) return stdout;
Function rayTrace
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
rayTrace: function(info, ray, scene, depth){
// Calc ambient
var color = Flog.RayTracer.Color.prototype.multiplyScalar(info.color, scene.background.ambience);
var oldColor = color;
var shininess = Math.pow(10, info.shape.material.gloss + 1);
Function processList
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
function processList(section) {
var list = section.list;
var values = [];
var current;
var stack = [];
Function mirrorObject
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
Client.prototype.mirrorObject = function(handle, depth, cb) {
var self = this;
var val;
Function encode
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
function encode(input) {
var n,
delta,
handledCPCount,
basicLength,
Function runBlock0
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
function runBlock0() {
for (var i = 0; i < 6511; i++) {
re0.exec(s0[i]);
}
for (var i = 0; i < 1844; i++) {
Function installMany
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
function installMany (what, where, context, cb) {
// readDependencies takes care of figuring out whether the list of
// dependencies we'll iterate below comes from an existing shrinkwrap from a
// parent level, a new shrinkwrap at this level, or package.json at this
// level, as well as which shrinkwrap (if any) our dependencies should use.
OrderedDict
has 25 functions (exceeds 20 allowed). Consider refactoring. Open
class OrderedDict(dict):
'Dictionary that remembers insertion order'
# An inherited dict maps keys to values.
# The inherited dict provides __getitem__, __len__, __contains__, and get.
# The remaining methods are order-aware.
TestSuite
has 25 functions (exceeds 20 allowed). Consider refactoring. Open
class TestSuite(object):
@staticmethod
def LoadTestSuite(root):
name = root.split(os.path.sep)[-1]
Function RtfGenerator
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
function RtfGenerator() {
var self = this,
did_write_anything = false;
Stream.call(this);
Function read
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
sc_Reader.prototype.read = function() {
function readList(listBeginType) {
function matchesPeer(open, close) {
return open === 1/*OPEN_PAR*/ && close === 2/*CLOSE_PAR*/
|| open === 3/*OPEN_BRACE*/ && close === 4/*CLOSE_BRACE*/
Function run
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
function run(args) {
var file = args["file"];
var resx = args["resx"];
var resy = args["resy"];
var distortion = args["distortion"];
Function save
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
function save (where, installed, tree, pretty, hasArguments, cb) {
if (!hasArguments ||
!npm.config.get("save") &&
!npm.config.get("save-dev") &&
!npm.config.get("save-optional") ||
Function onCryptoStreamFinish
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
function onCryptoStreamFinish() {
this._finished = true;
if (this === this.pair.cleartext) {
debug('cleartext.onfinish');
- 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 bnpFromNumber
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
function bnpFromNumber(a,b,c) {
if("number" == typeof b) {
// new BigInteger(int,int,RNG)
if(a < 2) this.fromInt(1);
else {
- 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 _ConstructContentList
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
def _ConstructContentList(xml_parts, specification, pretty, level=0):
""" Appends the XML parts corresponding to the specification.
Args:
xml_parts: A list of XML parts to be appended to.
- 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 Main
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
def Main():
parser = BuildOptions()
(options, args) = parser.parse_args()
if not ProcessOptions(options):
parser.print_help()
- 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 __init__
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
def __init__(self, options, minidump_name):
self.minidump_name = minidump_name
self.minidump_file = open(minidump_name, "r")
self.minidump = mmap.mmap(self.minidump_file.fileno(), 0, mmap.MAP_PRIVATE)
self.header = MINIDUMP_HEADER.Read(self.minidump, 0)
- 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 _init
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
TLSSocket.prototype._init = function(socket) {
assert(this._handle);
// lib/net.js expect this value to be non-zero if write hasn't been flushed
// immediately
Function readInstalled
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
function readInstalled (dir, counter, parent, cb) {
var pkg, children, realpath
fs.realpath(dir, function (er, rp) {
realpath = rp