Showing 236 of 328 total issues
Function 9
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
},{"./source-map/source-map-consumer":13,"./source-map/source-map-generator":14,"./source-map/source-node":15}],9:[function(_dereq_,module,exports){
/* -*- Mode: js; js-indent-level: 2; -*- */
/*
* Copyright 2011 Mozilla Foundation and contributors
* Licensed under the New BSD license. See LICENSE or:
Function parseFunctionExpression
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function parseFunctionExpression() {
var token, id = null, firstRestricted, message, tmp, body, previousStrict, previousYieldAllowed, generator;
expectKeyword('function');
Function advanceSlash
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function advanceSlash() {
var prevToken,
checkToken;
// Using the following algorithm:
// https://github.com/mozilla/sweet.js/wiki/design
Function Buffer
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function Buffer (subject, encoding, noZero) {
if (!(this instanceof Buffer))
return new Buffer(subject, encoding, noZero)
var type = typeof subject
Function parseFunctionDeclaration
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function parseFunctionDeclaration() {
var id, body, token, tmp, firstRestricted, message, previousStrict, previousYieldAllowed, generator;
expectKeyword('function');
Function write
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
exports.write = function(buffer, value, offset, isLE, mLen, nBytes) {
var e, m, c,
eLen = nBytes * 8 - mLen - 1,
eMax = (1 << eLen) - 1,
eBias = eMax >> 1,
Function 18
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
},{"/Users/poshannessy/FB/code/react/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js":4,"path":5}],18:[function(_dereq_,module,exports){
/**
* Copyright 2013 Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
Function renderXJSLiteral
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function renderXJSLiteral(object, isLast, state, start, end) {
var lines = object.value.split(/\r\n|\n|\r/);
if (start) {
utils.append(start, state);
Function augment
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function augment (arr) {
arr._isBuffer = true
// save reference to original Uint8Array get/set methods before overwriting
arr._get = arr.get
Function 4
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
},{}],4:[function(_dereq_,module,exports){
// shim for using process in browser
var process = module.exports = {};
Consider simplifying this complex logical expression. Open
Open
if (object &&
object.type === Syntax.CallExpression &&
object.callee.type === Syntax.MemberExpression &&
object.callee.object.type === Syntax.Identifier &&
object.callee.object.name === 'React' &&
Function parseAssignmentExpression
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function parseAssignmentExpression() {
var expr, token, params, oldParenthesizedCount;
if (matchKeyword('yield')) {
return parseYieldExpression();
Function 24
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
},{"../src/utils":20,"esprima-fb":6}],24:[function(_dereq_,module,exports){
/**
* Copyright 2013 Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
Method endpoints
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
Open
def endpoints
unless @endpoints
@endpoints = []
prefix = nil
- 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 parseParam
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function parseParam(options) {
var token, rest, param, def;
token = lookahead;
if (token.value === '...') {
Function parseExportDeclaration
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function parseExportDeclaration() {
var previousAllowKeyword, decl, def, src, specifiers;
expectKeyword('export');
Function transformCode
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var transformCode = function(code, source) {
var jsx = docblock.parseAsObject(docblock.extract(code)).jsx;
if (jsx) {
try {
Function visitTaggedTemplateExpression
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function visitTaggedTemplateExpression(traverse, node, path, state) {
var template = node.quasi;
var numQuasis = template.quasis.length;
// print the tag
Function parseExpression
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function parseExpression() {
var expr, expressions, sequence, coverFormalsList, spreadFound, oldParenthesizedCount;
oldParenthesizedCount = state.parenthesizedCount;
Function parseObjectInitialiser
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function parseObjectInitialiser() {
var properties = [], property, name, key, kind, map = {}, toString = String;
expect('{');