razum2um/lurker

View on GitHub

Showing 330 of 330 total issues

Function binaryPrecedence has 54 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function binaryPrecedence(token, allowIn) {
        var prec = 0;

        if (token.type !== Token.Punctuator && token.type !== Token.Keyword) {
            return 0;
Severity: Major
Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 2 hrs to fix

    Function 21 has 53 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    },{"./docblock":18}],21:[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 2 hrs to fix

      Function parseFunctionSourceElements has 52 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function parseFunctionSourceElements() {
              var sourceElement, sourceElements = [], token, directive, firstRestricted,
                  oldLabelSet, oldInIteration, oldInSwitch, oldInFunctionBody, oldParenthesizedCount;
      
              expect('{');
      Severity: Major
      Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 2 hrs to fix

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

            function parseStatementList() {
                var list = [],
                    statement;
        
                while (index < length) {
        Severity: Major
        Found in lib/lurker/templates/javascripts/JSXTransformer.js and 1 other location - About 2 hrs to fix
        lib/lurker/templates/javascripts/JSXTransformer.js on lines 6353..6369

        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 76.

        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 parseModuleElements() {
                var list = [],
                    statement;
        
                while (index < length) {
        Severity: Major
        Found in lib/lurker/templates/javascripts/JSXTransformer.js and 1 other location - About 2 hrs to fix
        lib/lurker/templates/javascripts/JSXTransformer.js on lines 4874..4890

        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 76.

        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 write has 50 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        Buffer.prototype.write = function (string, offset, length, encoding) {
          // Support both (string, offset, length, encoding)
          // and the legacy (string, encoding, offset, length)
          if (isFinite(offset)) {
            if (!isFinite(length)) {
        Severity: Minor
        Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 2 hrs to fix

          Function reinterpretAsCoverFormalsList has 48 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              function reinterpretAsCoverFormalsList(expressions) {
                  var i, len, param, params, defaults, defaultCount, options, rest;
          
                  params = [];
                  defaults = [];
          Severity: Minor
          Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 1 hr to fix

            Function SourceMapGenerator_applySourceMap has 48 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile) {
                  // If aSourceFile is omitted, we will use the file property of the SourceMap
                  if (!aSourceFile) {
                    aSourceFile = aSourceMapConsumer.file;
                  }
            Severity: Minor
            Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 1 hr to fix

              Function visitClassFunctionExpression has 48 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function visitClassFunctionExpression(traverse, node, path, state) {
                var methodNode = path[0];
              
                state = utils.updateState(state, {
                  methodFuncNode: node
              Severity: Minor
              Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 1 hr to fix

                Function advance has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    function advance() {
                        var ch;
                
                        if (!state.inXJSChild) {
                            skipComment();
                Severity: Minor
                Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 1 hr to fix

                  Function SourceMapGenerator_serializeMappings has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      function SourceMapGenerator_serializeMappings() {
                        var previousGeneratedColumn = 0;
                        var previousGeneratedLine = 1;
                        var previousOriginalColumn = 0;
                        var previousOriginalLine = 0;
                  Severity: Minor
                  Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 1 hr to fix

                    Function parseObjectProperty has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        function parseObjectProperty() {
                            var token, key, id, value, param;
                    
                            token = lookahead;
                    
                    
                    Severity: Minor
                    Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 1 hr to fix

                      Function 9 has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                      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:
                      Severity: Minor
                      Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 1 hr to fix

                        Function advanceSlash has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            function advanceSlash() {
                                var prevToken,
                                    checkToken;
                                // Using the following algorithm:
                                // https://github.com/mozilla/sweet.js/wiki/design
                        Severity: Minor
                        Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 1 hr to fix

                          Function parseFunctionExpression has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              function parseFunctionExpression() {
                                  var token, id = null, firstRestricted, message, tmp, body, previousStrict, previousYieldAllowed, generator;
                          
                                  expectKeyword('function');
                          
                          
                          Severity: Minor
                          Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 1 hr to fix

                            Function Buffer has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            function Buffer (subject, encoding, noZero) {
                              if (!(this instanceof Buffer))
                                return new Buffer(subject, encoding, noZero)
                            
                              var type = typeof subject
                            Severity: Minor
                            Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 1 hr to fix

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

                                      createFunctionDeclaration: function (id, params, defaults, body, rest, generator, expression,
                                                                           returnType) {
                                          return {
                                              type: Syntax.FunctionDeclaration,
                                              id: id,
                              Severity: Major
                              Found in lib/lurker/templates/javascripts/JSXTransformer.js and 1 other location - About 1 hr to fix
                              lib/lurker/templates/javascripts/JSXTransformer.js on lines 3315..3328

                              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 71.

                              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

                                      createFunctionExpression: function (id, params, defaults, body, rest, generator, expression,
                                                                          returnType) {
                                          return {
                                              type: Syntax.FunctionExpression,
                                              id: id,
                              Severity: Major
                              Found in lib/lurker/templates/javascripts/JSXTransformer.js and 1 other location - About 1 hr to fix
                              lib/lurker/templates/javascripts/JSXTransformer.js on lines 3300..3313

                              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 71.

                              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 parseFunctionDeclaration has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  function parseFunctionDeclaration() {
                                      var id, body, token, tmp, firstRestricted, message, previousStrict, previousYieldAllowed, generator;
                              
                                      expectKeyword('function');
                              
                              
                              Severity: Minor
                              Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 1 hr to fix

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

                                        if (ch1 === '<' && ch2 === '<' && ch3 === '=') {
                                            index += 3;
                                            return {
                                                type: Token.Punctuator,
                                                value: '<<=',
                                Severity: Major
                                Found in lib/lurker/templates/javascripts/JSXTransformer.js and 1 other location - About 1 hr to fix
                                lib/lurker/templates/javascripts/JSXTransformer.js on lines 2375..2384

                                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 70.

                                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