razum2um/lurker

View on GitHub

Showing 236 of 328 total issues

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

          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

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

              Function 18 has 43 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,"path":5}],18:[function(_dereq_,module,exports){
              /**
               * Copyright 2013 Facebook, Inc.
               *
               * Licensed under the Apache License, Version 2.0 (the "License");
              Severity: Minor
              Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 1 hr to fix

                Function renderXJSLiteral has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function renderXJSLiteral(object, isLast, state, start, end) {
                  var lines = object.value.split(/\r\n|\n|\r/);
                
                  if (start) {
                    utils.append(start, state);
                Severity: Minor
                Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 1 hr to fix

                  Function augment has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function augment (arr) {
                    arr._isBuffer = true
                  
                    // save reference to original Uint8Array get/set methods before overwriting
                    arr._get = arr.get
                  Severity: Minor
                  Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 1 hr to fix

                    Function 4 has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    },{}],4:[function(_dereq_,module,exports){
                    // shim for using process in browser
                    
                    var process = module.exports = {};
                    
                    
                    Severity: Minor
                    Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 1 hr to fix

                      Consider simplifying this complex logical expression.
                      Open

                        if (object &&
                            object.type === Syntax.CallExpression &&
                            object.callee.type === Syntax.MemberExpression &&
                            object.callee.object.type === Syntax.Identifier &&
                            object.callee.object.name === 'React' &&
                      Severity: Critical
                      Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 1 hr to fix

                        Function parseAssignmentExpression has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            function parseAssignmentExpression() {
                                var expr, token, params, oldParenthesizedCount;
                        
                                if (matchKeyword('yield')) {
                                    return parseYieldExpression();
                        Severity: Minor
                        Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 1 hr to fix

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

                            Method endpoints has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                            Open

                              def endpoints
                                unless @endpoints
                                  @endpoints = []
                                  prefix = nil
                            
                            
                            Severity: Minor
                            Found in lib/lurker/presenters/service_presenter.rb - About 1 hr to fix

                            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

                                function parseParam(options) {
                                    var token, rest, param, def;
                            
                                    token = lookahead;
                                    if (token.value === '...') {
                            Severity: Minor
                            Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 1 hr to fix

                              Function parseExportDeclaration has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  function parseExportDeclaration() {
                                      var previousAllowKeyword, decl, def, src, specifiers;
                              
                                      expectKeyword('export');
                              
                              
                              Severity: Minor
                              Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 1 hr to fix

                                Function transformCode has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                var transformCode = function(code, source) {
                                  var jsx = docblock.parseAsObject(docblock.extract(code)).jsx;
                                
                                  if (jsx) {
                                    try {
                                Severity: Minor
                                Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 1 hr to fix

                                  Function visitTaggedTemplateExpression has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  function visitTaggedTemplateExpression(traverse, node, path, state) {
                                    var template = node.quasi;
                                    var numQuasis = template.quasis.length;
                                  
                                    // print the tag
                                  Severity: Minor
                                  Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 1 hr to fix

                                    Function parseExpression has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        function parseExpression() {
                                            var expr, expressions, sequence, coverFormalsList, spreadFound, oldParenthesizedCount;
                                    
                                            oldParenthesizedCount = state.parenthesizedCount;
                                    
                                    
                                    Severity: Minor
                                    Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 1 hr to fix

                                      Function parseObjectInitialiser has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          function parseObjectInitialiser() {
                                              var properties = [], property, name, key, kind, map = {}, toString = String;
                                      
                                              expect('{');
                                      
                                      
                                      Severity: Minor
                                      Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 1 hr to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language