Showing 99 of 254 total issues
Function IndexedSourceMapConsumer
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function IndexedSourceMapConsumer(aSourceMap) {
var sourceMap = aSourceMap;
if (typeof aSourceMap === 'string') {
sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, ''));
}
Function BinaryExpression
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
BinaryExpression: function (expr, precedence, flags) {
var result, currentPrecedence, fragment, leftSource;
currentPrecedence = BinaryPrecedence[expr.operator];
if (currentPrecedence < precedence) {
flags |= F_ALLOW_IN;
Function adjustMultilineComment
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function adjustMultilineComment(value, specialBase) {
var array, i, len, line, j, spaces, previousBase, sn;
array = value.split(/\r\n|[\r\n]/);
spaces = Number.MAX_VALUE;
for (i = 1, len = array.length; i < len; ++i) {
Function ForStatement
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
ForStatement: function (stmt, flags) {
var result, that = this;
withIndent(function () {
result = ['for' + space + '('];
if (stmt.init) {
Function join
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function join(aRoot, aPath) {
if (aRoot === '') {
aRoot = '.';
}
if (aPath === '') {
Function IndexedSourceMapConsumer_parseMappings
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
IndexedSourceMapConsumer.prototype._parseMappings = function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {
this.__generatedMappings = [];
this.__originalMappings = [];
for (var i = 0; i < this._sections.length; i++) {
var section = this._sections[i];
Function VariableDeclaration
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
VariableDeclaration: function (stmt, flags) {
var result, i, iz, node, bodyFlags, that = this;
result = [stmt.kind];
bodyFlags = flags & F_ALLOW_IN ? S_TFFF : S_FFFF;
function block() {
Function join
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function join(left, right) {
var leftSource, rightSource, leftCharCode, rightCharCode;
leftSource = toSourceNodeWhenNeeded(left).toString();
if (leftSource.length === 0) {
return [right];
Function SourceMapConsumer_eachMapping
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
SourceMapConsumer.prototype.eachMapping = function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {
var context = aContext || null;
var order = aOrder || SourceMapConsumer.GENERATED_ORDER;
var mappings;
switch (order) {
Function IfStatement
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
IfStatement: function (stmt, flags) {
var result, bodyFlags, semicolonOptional, that = this;
withIndent(function () {
result = [
'if' + space + '(',
Function define
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function define(id, deps, factory) {
if (Array.isArray(id)) {
factory = deps;
deps = id;
id = undefined;
Function SourceMapConsumer_originalPositionFor
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
BasicSourceMapConsumer.prototype.originalPositionFor = function SourceMapConsumer_originalPositionFor(aArgs) {
var needle = {
generatedLine: util.getArg(aArgs, 'line'),
generatedColumn: util.getArg(aArgs, 'column')
};
Consider simplifying this complex logical expression. Open
Open
if ((leftCharCode === 43 || leftCharCode === 45) && leftCharCode === rightCharCode || esutils.code.isIdentifierPartES5(leftCharCode) && esutils.code.isIdentifierPartES5(rightCharCode) || leftCharCode === 47 && rightCharCode === 105) {
return [
left,
noEmptySpace(),
right
Consider simplifying this complex logical expression. Open
Open
} else if (!esutils.code.isIdentifierPartES5(code) && (json && code < 32 || !json && !escapeless && (code < 32 || code > 126))) {
result += escapeAllowedCharacter(code, str.charCodeAt(i + 1));
continue;
}
Avoid deeply nested control flow statements. Open
Open
if (ch === 47) {
result += '\\';
} else if (ch === 91) {
characterInBrack = true;
}
Avoid deeply nested control flow statements. Open
Open
while ((current2 -= 1) >= 0) {
if (!candidate[current2]) {
continue;
}
if (isProperty(nodeType, candidates[current])) {
Avoid deeply nested control flow statements. Open
Open
if (!candidate[current2]) {
continue;
}
Avoid deeply nested control flow statements. Open
Open
if (isProperty(nodeType, candidates[current])) {
element = new Element(candidate[current2], [
key,
current2
], 'Property', new Reference(candidate, current2));
Avoid deeply nested control flow statements. Open
Open
} else if (isNode(candidate)) {
worklist.push(new Element(candidate, key, null, null));
}
Avoid deeply nested control flow statements. Open
Open
if (stmt.finalizer || i + 1 !== iz) {
result = this.maybeBlockSuffix(stmt.handler[i].body, result);
}