razum2um/lurker

View on GitHub

Showing 330 of 330 total issues

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

        if (strict && param.type === Syntax.Identifier && isRestrictedWord(param.name)) {
            throwErrorTolerant({}, Messages.StrictCatchVariable);
        }
Severity: Major
Found in lib/lurker/templates/javascripts/JSXTransformer.js and 2 other locations - About 45 mins to fix
lib/lurker/templates/javascripts/JSXTransformer.js on lines 4412..4414
lib/lurker/templates/javascripts/JSXTransformer.js on lines 4440..4442

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

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

        return (ch === 36) || (ch === 95) ||  // $ (dollar) and _ (underscore)
            (ch >= 65 && ch <= 90) ||         // A..Z
            (ch >= 97 && ch <= 122) ||        // a..z
            (ch >= 48 && ch <= 57) ||         // 0..9
Severity: Minor
Found in lib/lurker/templates/javascripts/JSXTransformer.js and 1 other location - About 45 mins to fix
lib/lurker/templates/javascripts/JSXTransformer.js on lines 1930..1933

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

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

        return (ch === 36) || (ch === 95) ||  // $ (dollar) and _ (underscore)
            (ch >= 65 && ch <= 90) ||         // A..Z
            (ch >= 97 && ch <= 122) ||        // a..z
            (ch === 92) ||                    // \ (backslash)
Severity: Minor
Found in lib/lurker/templates/javascripts/JSXTransformer.js and 1 other location - About 45 mins to fix
lib/lurker/templates/javascripts/JSXTransformer.js on lines 1938..1941

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

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 || ch === '\\' || !isIdentifierStart(ch.charCodeAt(0))) {
                throwError({}, Messages.UnexpectedToken, 'ILLEGAL');
            }
Severity: Minor
Found in lib/lurker/templates/javascripts/JSXTransformer.js and 1 other location - About 40 mins to fix
lib/lurker/templates/javascripts/JSXTransformer.js on lines 2180..2182

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

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 || ch === '\\' || !isIdentifierPart(ch.charCodeAt(0))) {
                    throwError({}, Messages.UnexpectedToken, 'ILLEGAL');
                }
Severity: Minor
Found in lib/lurker/templates/javascripts/JSXTransformer.js and 1 other location - About 40 mins to fix
lib/lurker/templates/javascripts/JSXTransformer.js on lines 2158..2160

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

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

Consider simplifying this complex logical expression.
Open

                if (checkToken &&
                        checkToken.type === 'Keyword' &&
                        (checkToken.value === 'if' ||
                         checkToken.value === 'while' ||
                         checkToken.value === 'for' ||
Severity: Major
Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 40 mins to fix

    Function _writeUInt32 has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    function _writeUInt32 (buf, value, offset, littleEndian, noAssert) {
    Severity: Minor
    Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 35 mins to fix

      Function _writeInt32 has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      function _writeInt32 (buf, value, offset, littleEndian, noAssert) {
      Severity: Minor
      Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 35 mins to fix

        Function _findMapping has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName,
                                                   aColumnName, aComparator) {
        Severity: Minor
        Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 35 mins to fix

          Function renderXJSExpressionContainer has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          function renderXJSExpressionContainer(traverse, object, isLast, path, state) {
          Severity: Minor
          Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 35 mins to fix

            Function _writeFloat has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

            function _writeFloat (buf, value, offset, littleEndian, noAssert) {
            Severity: Minor
            Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 35 mins to fix

              Function createArrowFunctionExpression has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                      createArrowFunctionExpression: function (params, defaults, body, rest, expression) {
              Severity: Minor
              Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 35 mins to fix

                Function read has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                exports.read = function(buffer, offset, isLE, mLen, nBytes) {
                Severity: Minor
                Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 35 mins to fix

                  Function addComment has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      function addComment(type, value, start, end, loc) {
                  Severity: Minor
                  Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 35 mins to fix

                    Function recursiveSearch has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                      function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare) {
                    Severity: Minor
                    Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 35 mins to fix

                      Function _writeDouble has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                      function _writeDouble (buf, value, offset, littleEndian, noAssert) {
                      Severity: Minor
                      Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 35 mins to fix

                        Function createProperty has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                                createProperty: function (kind, key, value, method, shorthand) {
                        Severity: Minor
                        Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 35 mins to fix

                          Function _writeUInt16 has 5 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                          function _writeUInt16 (buf, value, offset, littleEndian, noAssert) {
                          Severity: Minor
                          Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 35 mins to fix

                            Function _writeInt16 has 5 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                            function _writeInt16 (buf, value, offset, littleEndian, noAssert) {
                            Severity: Minor
                            Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 35 mins to fix

                              Function SourceNode has 5 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                function SourceNode(aLine, aColumn, aSource, aChunks, aName) {
                              Severity: Minor
                              Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 35 mins to fix
                                Severity
                                Category
                                Status
                                Source
                                Language