razum2um/lurker

View on GitHub

Showing 328 of 328 total issues

Class EndpointPresenter has 30 methods (exceeds 20 allowed). Consider refactoring.
Open

class Lurker::EndpointPresenter < Lurker::BasePresenter
  attr_accessor :service_presenter, :endpoint, :endpoint_presenter

  extend Forwardable
  def_delegators :endpoint, :url_params
Severity: Minor
Found in lib/lurker/presenters/endpoint_presenter.rb - About 3 hrs to fix

    Function 2 has 91 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    },{"base64-js":2,"ieee754":3}],2:[function(_dereq_,module,exports){
    var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
    
    ;(function (exports) {
        'use strict';
    Severity: Major
    Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 3 hrs to fix

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

              if (strict) {
                  if (isRestrictedWord(token.value)) {
                      throwErrorTolerant(token, Messages.StrictFunctionName);
                  }
              } else {
      Severity: Major
      Found in lib/lurker/templates/javascripts/JSXTransformer.js and 1 other location - About 3 hrs to fix
      lib/lurker/templates/javascripts/JSXTransformer.js on lines 6018..6030

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

      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

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

                  if (strict) {
                      if (isRestrictedWord(token.value)) {
                          throwErrorTolerant(token, Messages.StrictFunctionName);
                      }
                  } else {
      Severity: Major
      Found in lib/lurker/templates/javascripts/JSXTransformer.js and 1 other location - About 3 hrs to fix
      lib/lurker/templates/javascripts/JSXTransformer.js on lines 5961..5973

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

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

          function scanRegExp() {
              var str, ch, start, pattern, flags, value, classMarker = false, restore, terminated = false;
      
              lookahead = null;
              skipComment();
      Severity: Major
      Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 3 hrs to fix

        Function scanNumericLiteral has 84 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function scanNumericLiteral() {
                var number, start, ch, octal;
        
                ch = source[index];
                assert(isDecimalDigit(ch.charCodeAt(0)) || (ch === '.'),
        Severity: Major
        Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 3 hrs to fix

          Function tokenize has 80 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              function tokenize(code, options) {
                  var toString,
                      token,
                      tokens;
          
          
          Severity: Major
          Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 3 hrs to fix

            Function parse has 78 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                function parse(code, options) {
                    var program, toString;
            
                    toString = String;
                    if (typeof code !== 'string' && !(code instanceof String)) {
            Severity: Major
            Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 3 hrs to fix

              Function parseMethodDefinition has 78 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function parseMethodDefinition(existingPropNames) {
                      var token, key, param, propType, isValidDuplicateProp = false;
              
                      if (lookahead.value === 'static') {
                          propType = ClassPropertyType["static"];
              Severity: Major
              Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 3 hrs to fix

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

                    state.g.sourceMap.addMapping({
                      generated: { line: state.g.bufferLine, column: state.g.bufferColumn },
                      original: { line: state.g.sourceLine, column: state.g.sourceColumn },
                      source: state.g.sourceMapFilename
                    });
                Severity: Major
                Found in lib/lurker/templates/javascripts/JSXTransformer.js and 1 other location - About 3 hrs to fix
                lib/lurker/templates/javascripts/JSXTransformer.js on lines 10713..10717

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

                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

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

                    state.g.sourceMap.addMapping({
                      generated: { line: state.g.bufferLine, column: state.g.bufferColumn },
                      original: { line: state.g.sourceLine, column: state.g.sourceColumn },
                      source: state.g.sourceMapFilename
                    });
                Severity: Major
                Found in lib/lurker/templates/javascripts/JSXTransformer.js and 1 other location - About 3 hrs to fix
                lib/lurker/templates/javascripts/JSXTransformer.js on lines 10600..10604

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

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

                },{}],3:[function(_dereq_,module,exports){
                exports.read = function(buffer, offset, isLE, mLen, nBytes) {
                  var e, m,
                      eLen = nBytes * 8 - mLen - 1,
                      eMax = (1 << eLen) - 1,
                Severity: Major
                Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 2 hrs to fix

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

                          if (lookahead.type === Token.Identifier) {
                              label = parseVariableIdentifier();
                  
                              key = '$' + label.name;
                              if (!Object.prototype.hasOwnProperty.call(state.labelSet, key)) {
                  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 5411..5418

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

                  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

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

                          if (lookahead.type === Token.Identifier) {
                              label = parseVariableIdentifier();
                  
                              key = '$' + label.name;
                              if (!Object.prototype.hasOwnProperty.call(state.labelSet, key)) {
                  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 5455..5462

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

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

                      function parseForStatement(opts) {
                          var init, test, update, left, right, body, operator, oldInIteration;
                          init = test = update = null;
                          expectKeyword('for');
                  
                  
                  Severity: Major
                  Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 2 hrs to fix

                    Class Cli has 25 methods (exceeds 20 allowed). Consider refactoring.
                    Open

                      class Cli < Thor
                        include Thor::Actions
                    
                        attr_accessor :content
                    
                    
                    Severity: Minor
                    Found in lib/lurker/cli.rb - About 2 hrs to fix

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

                        Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', {
                          get: function () {
                            if (!this.__originalMappings) {
                              this.__generatedMappings = [];
                              this.__originalMappings = [];
                      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 8481..8491

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

                      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

                        Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', {
                          get: function () {
                            if (!this.__generatedMappings) {
                              this.__generatedMappings = [];
                              this.__originalMappings = [];
                      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 8494..8504

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

                      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 (!noAssert) {
                          assert(value !== undefined && value !== null, 'missing value')
                          assert(typeof littleEndian === 'boolean', 'missing or invalid endian')
                          assert(offset !== undefined && offset !== null, 'missing offset')
                          assert(offset + 1 < buf.length, 'trying to write beyond buffer 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 721..727

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

                      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 (!noAssert) {
                          assert(value !== undefined && value !== null, 'missing value')
                          assert(typeof littleEndian === 'boolean', 'missing or invalid endian')
                          assert(offset !== undefined && offset !== null, 'missing offset')
                          assert(offset + 3 < buf.length, 'trying to write beyond buffer 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 693..699

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

                      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