razum2um/lurker

View on GitHub

Showing 328 of 328 total issues

File JSXTransformer.js has 9111 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
 * JSXTransformer v0.10.0
 */
!function(e){if("object"==typeof exports)module.exports=e();else if("function"==typeof define&&define.amd)define(e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.JSXTransformer=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
/**
Severity: Major
Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 3 wks to fix

    Function 6 has 5082 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    },{"/Users/poshannessy/FB/code/react/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js":4}],6:[function(_dereq_,module,exports){
    /*
      Copyright (C) 2013 Ariya Hidayat <ariya.hidayat@gmail.com>
      Copyright (C) 2013 Thaddee Tyl <thaddee.tyl@gmail.com>
      Copyright (C) 2012 Ariya Hidayat <ariya.hidayat@gmail.com>
    Severity: Major
    Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 3 wks to fix

      Function 1 has 875 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      !function(e){if("object"==typeof exports)module.exports=e();else if("function"==typeof define&&define.amd)define(e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.JSXTransformer=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
      /**
       * The buffer module from node.js, for the browser.
       *
       * Author:   Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
      Severity: Major
      Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 4 days to fix

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

                        if (!isLineTerminator(ch.charCodeAt(0))) {
                            switch (ch) {
                            case 'n':
                                cooked += '\n';
                                break;
        Severity: Major
        Found in lib/lurker/templates/javascripts/JSXTransformer.js and 1 other location - About 2 days to fix
        lib/lurker/templates/javascripts/JSXTransformer.js on lines 2638..2707

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 383.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

                        if (!ch || !isLineTerminator(ch.charCodeAt(0))) {
                            switch (ch) {
                            case 'n':
                                str += '\n';
                                break;
        Severity: Major
        Found in lib/lurker/templates/javascripts/JSXTransformer.js and 1 other location - About 2 days to fix
        lib/lurker/templates/javascripts/JSXTransformer.js on lines 2753..2822

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 383.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Function 22 has 303 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        },{"../src/utils":20,"./es6-rest-param-visitors":24,"esprima-fb":6}],22:[function(_dereq_,module,exports){
        /**
         * Copyright 2013 Facebook, Inc.
         *
         * Licensed under the Apache License, Version 2.0 (the "License");
        Severity: Major
        Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 1 day to fix

          Function 13 has 268 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          },{"amdefine":17}],13:[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:
          Severity: Major
          Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 1 day to fix

            Function 14 has 257 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            },{"./array-set":9,"./base64-vlq":10,"./binary-search":12,"./util":16,"amdefine":17}],14:[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:
            Severity: Major
            Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 1 day to fix

              Function 15 has 247 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              },{"./array-set":9,"./base64-vlq":10,"./util":16,"amdefine":17}],15:[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:
              Severity: Major
              Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 1 day to fix

                Function 20 has 228 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                },{"./utils":20,"esprima-fb":6,"source-map":8}],20:[function(_dereq_,module,exports){
                /**
                 * Copyright 2013 Facebook, Inc.
                 *
                 * Licensed under the Apache License, Version 2.0 (the "License");
                Severity: Major
                Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 1 day to fix

                  Function 29 has 199 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  },{"esprima-fb":6,"jstransform/src/utils":20}],29:[function(_dereq_,module,exports){
                  /**
                   * Copyright 2013-2014 Facebook, Inc.
                   *
                   * Licensed under the Apache License, Version 2.0 (the "License");
                  Severity: Major
                  Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 7 hrs to fix

                    Function 17 has 191 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    },{"amdefine":17}],17:[function(_dereq_,module,exports){
                    (function (process,__filename){
                    /** vim: et:ts=4:sw=4:sts=4
                     * @license amdefine 0.1.0 Copyright (c) 2011, The Dojo Foundation All Rights Reserved.
                     * Available via the MIT or new BSD license.
                    Severity: Major
                    Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 7 hrs to fix

                      Function amdefine has 184 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      function amdefine(module, requireFn) {
                          'use strict';
                          var defineCache = {},
                              loaderCache = {},
                              alreadyCalled = false,
                      Severity: Major
                      Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 7 hrs to fix

                        Function scanPunctuator has 171 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            function scanPunctuator() {
                                var start = index,
                                    code = source.charCodeAt(index),
                                    code2,
                                    ch1 = source[index],
                        Severity: Major
                        Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 6 hrs to fix

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                          function _writeInt16 (buf, value, offset, littleEndian, noAssert) {
                            if (!noAssert) {
                              assert(value !== undefined && value !== null, 'missing value')
                              assert(typeof littleEndian === 'boolean', 'missing or invalid endian')
                              assert(offset !== undefined && offset !== null, 'missing offset')
                          Severity: Major
                          Found in lib/lurker/templates/javascripts/JSXTransformer.js and 1 other location - About 6 hrs to fix
                          lib/lurker/templates/javascripts/JSXTransformer.js on lines 791..808

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 166.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                          function _writeInt32 (buf, value, offset, littleEndian, noAssert) {
                            if (!noAssert) {
                              assert(value !== undefined && value !== null, 'missing value')
                              assert(typeof littleEndian === 'boolean', 'missing or invalid endian')
                              assert(offset !== undefined && offset !== null, 'missing offset')
                          Severity: Major
                          Found in lib/lurker/templates/javascripts/JSXTransformer.js and 1 other location - About 6 hrs to fix
                          lib/lurker/templates/javascripts/JSXTransformer.js on lines 764..781

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 166.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                              function filterCommentLocation() {
                                  var i, entry, comment, comments = [];
                          
                                  for (i = 0; i < extra.comments.length; ++i) {
                                      entry = extra.comments[i];
                          Severity: Major
                          Found in lib/lurker/templates/javascripts/JSXTransformer.js and 1 other location - About 6 hrs to fix
                          lib/lurker/templates/javascripts/JSXTransformer.js on lines 7198..7217

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 165.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                              function filterTokenLocation() {
                                  var i, entry, token, tokens = [];
                          
                                  for (i = 0; i < extra.tokens.length; ++i) {
                                      entry = extra.tokens[i];
                          Severity: Major
                          Found in lib/lurker/templates/javascripts/JSXTransformer.js and 1 other location - About 6 hrs to fix
                          lib/lurker/templates/javascripts/JSXTransformer.js on lines 6537..6556

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 165.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Function 19 has 158 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          },{}],19:[function(_dereq_,module,exports){
                          /**
                           * Copyright 2013 Facebook, Inc.
                           *
                           * Licensed under the Apache License, Version 2.0 (the "License");
                          Severity: Major
                          Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 6 hrs to fix

                            Similar blocks of code found in 2 locations. Consider refactoring.
                            Open

                                        if (existingPropNames[propType].hasOwnProperty(key.name)) {
                                            isValidDuplicateProp =
                                                // There isn't already a setter for this prop
                                                existingPropNames[propType][key.name].set === undefined
                                                // There isn't already a data prop by this name
                            Severity: Major
                            Found in lib/lurker/templates/javascripts/JSXTransformer.js and 1 other location - About 6 hrs to fix
                            lib/lurker/templates/javascripts/JSXTransformer.js on lines 6112..6125

                            Duplicated Code

                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                            Tuning

                            This issue has a mass of 156.

                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                            Refactorings

                            Further Reading

                            Severity
                            Category
                            Status
                            Source
                            Language