razum2um/lurker

View on GitHub

Showing 328 of 328 total issues

Function _readUInt32 has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function _readUInt32 (buf, offset, littleEndian, noAssert) {
  if (!noAssert) {
    assert(typeof littleEndian === 'boolean', 'missing or invalid endian')
    assert(offset !== undefined && offset !== null, 'missing offset')
    assert(offset + 3 < buf.length, 'Trying to read beyond buffer length')
Severity: Minor
Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 1 hr to fix

    Function parseContinueStatement has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function parseContinueStatement() {
            var label = null, key;
    
            expectKeyword('continue');
    
    
    Severity: Minor
    Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 1 hr to fix

      Function SourceMapConsumer_originalPositionFor has 27 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function SourceMapConsumer_originalPositionFor(aArgs) {
            var needle = {
              generatedLine: util.getArg(aArgs, 'line'),
              generatedColumn: util.getArg(aArgs, 'column')
            };
      Severity: Minor
      Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 1 hr to fix

        Function parseBreakStatement has 27 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function parseBreakStatement() {
                var label = null, key;
        
                expectKeyword('break');
        
        
        Severity: Minor
        Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 1 hr to fix

          Function b64ToByteArray has 27 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              function b64ToByteArray (b64) {
                  var i, j, l, tmp, placeHolders, arr
          
                  if (b64.length % 4 > 0) {
                      throw new Error('Invalid string. Length must be a multiple of 4')
          Severity: Minor
          Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 1 hr to fix

            Function transform has 26 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function transform(visitors, source, options) {
              options = options || {};
            
              var ast;
              try {
            Severity: Minor
            Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 1 hr to fix

              Function read has 26 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              exports.read = function(buffer, offset, isLE, mLen, nBytes) {
                var e, m,
                    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 parseParams has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    function parseParams(firstRestricted) {
                        var options;
                
                        options = {
                            params: [],
                Severity: Minor
                Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 1 hr to fix

                  Function parseModuleDeclaration has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      function parseModuleDeclaration() {
                          var id, src, body;
                  
                          lex();   // 'module'
                  
                  
                  Severity: Minor
                  Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 1 hr to fix

                    Function createFunctionDeclaration has 8 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                            createFunctionDeclaration: function (id, params, defaults, body, rest, generator, expression,
                                                                 returnType) {
                    Severity: Major
                    Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 1 hr to fix

                      Function createFunctionExpression has 8 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                              createFunctionExpression: function (id, params, defaults, body, rest, generator, expression,
                                                                  returnType) {
                      Severity: Major
                      Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 1 hr to fix

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

                          for (ii = 0; ii < numQuasis; ii++) {
                            utils.append(getRawValue(template.quasis[ii]), state);
                            if (ii !== numQuasis - 1) {
                              utils.append(', ', state);
                            }
                        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 11708..11713

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

                        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

                          for (var ii = 0; ii < numQuasis; ii++) {
                            utils.append(getCookedValue(template.quasis[ii]), state);
                            if (ii !== numQuasis - 1) {
                              utils.append(', ', state);
                            }
                        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 11715..11720

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

                        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

                                    } else if (Object.prototype.hasOwnProperty.call(options.paramSet, key)) {
                                        options.firstRestricted = param;
                                        options.message = Messages.StrictParamDupe;
                                    }
                        Severity: Minor
                        Found in lib/lurker/templates/javascripts/JSXTransformer.js and 1 other location - About 55 mins to fix
                        lib/lurker/templates/javascripts/JSXTransformer.js on lines 5844..5847

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

                        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 (Object.prototype.hasOwnProperty.call(options.paramSet, key)) {
                                        options.stricted = param;
                                        options.message = Messages.StrictParamDupe;
                                    }
                        Severity: Minor
                        Found in lib/lurker/templates/javascripts/JSXTransformer.js and 1 other location - About 55 mins to fix
                        lib/lurker/templates/javascripts/JSXTransformer.js on lines 5855..5858

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

                        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

                              aSourceMapConsumer.sources.forEach(function (sourceFile) {
                                var content = aSourceMapConsumer.sourceContentFor(sourceFile);
                                if (content) {
                                  generator.setSourceContent(sourceFile, content);
                                }
                        Severity: Minor
                        Found in lib/lurker/templates/javascripts/JSXTransformer.js and 1 other location - About 55 mins to fix
                        lib/lurker/templates/javascripts/JSXTransformer.js on lines 9305..9310

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

                        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

                              aSourceMapConsumer.sources.forEach(function (sourceFile) {
                                var content = aSourceMapConsumer.sourceContentFor(sourceFile);
                                if (content) {
                                  node.setSourceContent(sourceFile, content);
                                }
                        Severity: Minor
                        Found in lib/lurker/templates/javascripts/JSXTransformer.js and 1 other location - About 55 mins to fix
                        lib/lurker/templates/javascripts/JSXTransformer.js on lines 8878..8883

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

                        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

                                while (index < length) {
                                    ch = source.charCodeAt(index);
                                    if (!isXJSIdentifierPart(ch)) {
                                        break;
                                    }
                        Severity: Minor
                        Found in lib/lurker/templates/javascripts/JSXTransformer.js and 1 other location - About 55 mins to fix
                        lib/lurker/templates/javascripts/JSXTransformer.js on lines 6843..6849

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

                        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

                                    while (index < length) {
                                        ch = source.charCodeAt(index);
                                        if (!isXJSIdentifierPart(ch)) {
                                            break;
                                        }
                        Severity: Minor
                        Found in lib/lurker/templates/javascripts/JSXTransformer.js and 1 other location - About 55 mins to fix
                        lib/lurker/templates/javascripts/JSXTransformer.js on lines 6830..6836

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

                        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 (transformedLines.length > 1) {
                              state.g.bufferLine += transformedLines.length - 1;
                              state.g.bufferColumn = 0;
                            }
                        Severity: Minor
                        Found in lib/lurker/templates/javascripts/JSXTransformer.js and 1 other location - About 55 mins to fix
                        lib/lurker/templates/javascripts/JSXTransformer.js on lines 10696..10699

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

                        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