Showing 99 of 254 total issues
File escodegen.browser.js
has 4937 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// Generated by CommonJS Everywhere 0.9.7
/*
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
Function clone
has 767 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
}(this, function clone(exports) {
'use strict';
var Syntax, isArray, VisitorOption, VisitorKeys, objectCreate, objectKeys, BREAK, SKIP, REMOVE;
function ignoreJSHintError() {
}
File self-explain.js
has 551 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
"use strict";
(function codenautasModuleDefinition(root, name, factory) {
/* global define */
/* istanbul ignore next */
Function amdefine
has 188 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function amdefine(module, requireFn) {
'use strict';
var defineCache = {}, loaderCache = {}, alreadyCalled = false, path = require('path', module), makeRequire, stringRequire;
function trimDots(ary) {
var i, part;
Function replace
has 106 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Controller.prototype.replace = function replace(root, visitor) {
function removeElem(element) {
var i, key, nextElem, parent;
if (element.ref.remove()) {
key = element.ref.key;
Function differences
has 105 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
selfExplain.assert.differences = function differences(a, b, opts, prefix){
opts = opts || {};
prefix = prefix || '';
var delta = opts.delta || 0;
var format = selfExplain.assert.formatDiff;
Function addComments
has 103 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function addComments(stmt, result) {
var i, len, comment, save, tailingToStatement, specialBase, fragment, extRange, range, prevRange, prefix, infix, suffix, count;
if (stmt.leadingComments && stmt.leadingComments.length > 0) {
save = result;
if (preserveBlankLines) {
Function assert
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
selfExplain.assert = function assert(value){
if(value===true){
return '';
}
return (function(stack){
Function SourceNode_toStringWithSourceMap
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {
var generated = {
code: '',
line: 1,
column: 0
Function attachComments
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function attachComments(tree, providedComments, tokens) {
var comments = [], comment, len, i, cursor;
if (!tree.range) {
throw new Error('attachComments needs range information');
}
Function traverse
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Controller.prototype.traverse = function traverse(root, visitor) {
var worklist, leavelist, element, node, nodeType, ret, key, current, current2, candidates, candidate, sentinel;
this.__initialize(root, visitor);
sentinel = {};
worklist = this.__worklist;
Function BlockStatement
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
BlockStatement: function (stmt, flags) {
var range, content, result = [
'{',
newline
], that = this;
Function generate
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function generate(node, options) {
var defaultOptions = getDefaultOptions(), result, pair;
if (options != null) {
if (typeof options.indent === 'string') {
defaultOptions.format.indent.style = options.indent;
Function SourceNode_fromStringWithSourceMap
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
SourceNode.fromStringWithSourceMap = function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {
var node = new SourceNode;
var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);
var shiftNextLine = function () {
var lineContents = remainingLines.shift();
Consider simplifying this complex logical expression. Open
Open
} else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated && aOriginal && 'line' in aOriginal && 'column' in aOriginal && aGenerated.line > 0 && aGenerated.column >= 0 && aOriginal.line > 0 && aOriginal.column >= 0 && aSource) {
return;
} else {
throw new Error('Invalid mapping: ' + JSON.stringify({
generated: aGenerated,
Function SourceMapConsumer_parseMappings
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
BasicSourceMapConsumer.prototype._parseMappings = function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
var generatedLine = 1;
var previousGeneratedColumn = 0;
var previousOriginalLine = 0;
var previousOriginalColumn = 0;
Function SourceMapGenerator_applySourceMap
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
SourceMapGenerator.prototype.applySourceMap = function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {
var sourceFile = aSourceFile;
if (aSourceFile == null) {
if (aSourceMapConsumer.file == null) {
throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + 'or the source map\'s "file" property. Both were omitted.');
Function ImportDeclaration
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
ImportDeclaration: function (stmt, flags) {
var result, cursor, that = this;
if (stmt.specifiers.length === 0) {
return [
'import',
Function separateParts
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function separateParts(previousResult, expressions){
var result={changes:false};
var newParts=[];
var registerNewNode=function(part){
// console.log('pre generate',part);
Function ExpressionStatement
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
ExpressionStatement: function (stmt, flags) {
var result, fragment;
function isClassPrefixed(fragment) {
var code;
if (fragment.slice(0, 5) !== 'class') {