zxing-js/library

View on GitHub

Showing 958 of 958 total issues

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

        new Version(38, Int32Array.from([6, 32, 58, 84, 110, 136, 162]),
            new ECBlocks(30, new ECB(4, 122),
                new ECB(18, 123)),
            new ECBlocks(28, new ECB(13, 46),
                new ECB(32, 47)),
Severity: Major
Found in src/core/qrcode/decoder/Version.ts and 5 other locations - About 2 hrs to fix
src/core/qrcode/decoder/Version.ts on lines 326..334
src/core/qrcode/decoder/Version.ts on lines 335..343
src/core/qrcode/decoder/Version.ts on lines 344..352
src/core/qrcode/decoder/Version.ts on lines 362..370
src/core/qrcode/decoder/Version.ts on lines 371..379

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

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 6 locations. Consider refactoring.
Open

        new Version(40, Int32Array.from([6, 30, 58, 86, 114, 142, 170]),
            new ECBlocks(30, new ECB(19, 118),
                new ECB(6, 119)),
            new ECBlocks(28, new ECB(18, 47),
                new ECB(31, 48)),
Severity: Major
Found in src/core/qrcode/decoder/Version.ts and 5 other locations - About 2 hrs to fix
src/core/qrcode/decoder/Version.ts on lines 326..334
src/core/qrcode/decoder/Version.ts on lines 335..343
src/core/qrcode/decoder/Version.ts on lines 344..352
src/core/qrcode/decoder/Version.ts on lines 353..361
src/core/qrcode/decoder/Version.ts on lines 362..370

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

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 6 locations. Consider refactoring.
Open

        new Version(35, Int32Array.from([6, 30, 54, 78, 102, 126, 150]),
            new ECBlocks(30, new ECB(12, 121),
                new ECB(7, 122)),
            new ECBlocks(28, new ECB(12, 47),
                new ECB(26, 48)),
Severity: Major
Found in src/core/qrcode/decoder/Version.ts and 5 other locations - About 2 hrs to fix
src/core/qrcode/decoder/Version.ts on lines 335..343
src/core/qrcode/decoder/Version.ts on lines 344..352
src/core/qrcode/decoder/Version.ts on lines 353..361
src/core/qrcode/decoder/Version.ts on lines 362..370
src/core/qrcode/decoder/Version.ts on lines 371..379

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

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 6 locations. Consider refactoring.
Open

        new Version(36, Int32Array.from([6, 24, 50, 76, 102, 128, 154]),
            new ECBlocks(30, new ECB(6, 121),
                new ECB(14, 122)),
            new ECBlocks(28, new ECB(6, 47),
                new ECB(34, 48)),
Severity: Major
Found in src/core/qrcode/decoder/Version.ts and 5 other locations - About 2 hrs to fix
src/core/qrcode/decoder/Version.ts on lines 326..334
src/core/qrcode/decoder/Version.ts on lines 344..352
src/core/qrcode/decoder/Version.ts on lines 353..361
src/core/qrcode/decoder/Version.ts on lines 362..370
src/core/qrcode/decoder/Version.ts on lines 371..379

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

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

        for (let inputY = 0, outputY = topPadding; inputY < inputHeight; inputY++ , outputY += multiple) {
            // Write the contents of this row of the barcode
            for (let inputX = 0, outputX = leftPadding; inputX < inputWidth; inputX++ , outputX += multiple) {
                if (input.get(inputX, inputY) === 1) {
                    const svgRectElement = this.createSvgRectElement(outputX, outputY, multiple, multiple);
Severity: Major
Found in src/browser/BrowserSvgCodeWriter.ts and 1 other location - About 2 hrs to fix
src/browser/BrowserQRCodeSvgWriter.ts on lines 117..125

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

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

        for (let inputY = 0, outputY = topPadding; inputY < inputHeight; inputY++ , outputY += multiple) {
            // Write the contents of this row of the barcode
            for (let inputX = 0, outputX = leftPadding; inputX < inputWidth; inputX++ , outputX += multiple) {
                if (input.get(inputX, inputY) === 1) {
                    const svgRectElement = this.createSvgRectElement(outputX, outputY, multiple, multiple);
Severity: Major
Found in src/browser/BrowserQRCodeSvgWriter.ts and 1 other location - About 2 hrs to fix
src/browser/BrowserSvgCodeWriter.ts on lines 124..132

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

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 6 locations. Consider refactoring.
Open

        new Version(39, Int32Array.from([6, 26, 54, 82, 110, 138, 166]),
            new ECBlocks(30, new ECB(20, 117),
                new ECB(4, 118)),
            new ECBlocks(28, new ECB(40, 47),
                new ECB(7, 48)),
Severity: Major
Found in src/core/qrcode/decoder/Version.ts and 5 other locations - About 2 hrs to fix
src/core/qrcode/decoder/Version.ts on lines 326..334
src/core/qrcode/decoder/Version.ts on lines 335..343
src/core/qrcode/decoder/Version.ts on lines 344..352
src/core/qrcode/decoder/Version.ts on lines 353..361
src/core/qrcode/decoder/Version.ts on lines 371..379

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

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 6 locations. Consider refactoring.
Open

        new Version(33, Int32Array.from([6, 30, 58, 86, 114, 142]),
            new ECBlocks(30, new ECB(17, 115),
                new ECB(1, 116)),
            new ECBlocks(28, new ECB(14, 46),
                new ECB(21, 47)),
Severity: Major
Found in src/core/qrcode/decoder/Version.ts and 5 other locations - About 2 hrs to fix
src/core/qrcode/decoder/Version.ts on lines 264..272
src/core/qrcode/decoder/Version.ts on lines 273..281
src/core/qrcode/decoder/Version.ts on lines 282..290
src/core/qrcode/decoder/Version.ts on lines 291..299
src/core/qrcode/decoder/Version.ts on lines 317..325

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

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 6 locations. Consider refactoring.
Open

        new Version(28, Int32Array.from([6, 26, 50, 74, 98, 122]),
            new ECBlocks(30, new ECB(3, 117),
                new ECB(10, 118)),
            new ECBlocks(28, new ECB(3, 45),
                new ECB(23, 46)),
Severity: Major
Found in src/core/qrcode/decoder/Version.ts and 5 other locations - About 2 hrs to fix
src/core/qrcode/decoder/Version.ts on lines 273..281
src/core/qrcode/decoder/Version.ts on lines 282..290
src/core/qrcode/decoder/Version.ts on lines 291..299
src/core/qrcode/decoder/Version.ts on lines 308..316
src/core/qrcode/decoder/Version.ts on lines 317..325

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

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 6 locations. Consider refactoring.
Open

        new Version(29, Int32Array.from([6, 30, 54, 78, 102, 126]),
            new ECBlocks(30, new ECB(7, 116),
                new ECB(7, 117)),
            new ECBlocks(28, new ECB(21, 45),
                new ECB(7, 46)),
Severity: Major
Found in src/core/qrcode/decoder/Version.ts and 5 other locations - About 2 hrs to fix
src/core/qrcode/decoder/Version.ts on lines 264..272
src/core/qrcode/decoder/Version.ts on lines 282..290
src/core/qrcode/decoder/Version.ts on lines 291..299
src/core/qrcode/decoder/Version.ts on lines 308..316
src/core/qrcode/decoder/Version.ts on lines 317..325

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

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 6 locations. Consider refactoring.
Open

        new Version(34, Int32Array.from([6, 34, 62, 90, 118, 146]),
            new ECBlocks(30, new ECB(13, 115),
                new ECB(6, 116)),
            new ECBlocks(28, new ECB(14, 46),
                new ECB(23, 47)),
Severity: Major
Found in src/core/qrcode/decoder/Version.ts and 5 other locations - About 2 hrs to fix
src/core/qrcode/decoder/Version.ts on lines 264..272
src/core/qrcode/decoder/Version.ts on lines 273..281
src/core/qrcode/decoder/Version.ts on lines 282..290
src/core/qrcode/decoder/Version.ts on lines 291..299
src/core/qrcode/decoder/Version.ts on lines 308..316

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

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 6 locations. Consider refactoring.
Open

        new Version(30, Int32Array.from([6, 26, 52, 78, 104, 130]),
            new ECBlocks(30, new ECB(5, 115),
                new ECB(10, 116)),
            new ECBlocks(28, new ECB(19, 47),
                new ECB(10, 48)),
Severity: Major
Found in src/core/qrcode/decoder/Version.ts and 5 other locations - About 2 hrs to fix
src/core/qrcode/decoder/Version.ts on lines 264..272
src/core/qrcode/decoder/Version.ts on lines 273..281
src/core/qrcode/decoder/Version.ts on lines 291..299
src/core/qrcode/decoder/Version.ts on lines 308..316
src/core/qrcode/decoder/Version.ts on lines 317..325

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

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 6 locations. Consider refactoring.
Open

        new Version(31, Int32Array.from([6, 30, 56, 82, 108, 134]),
            new ECBlocks(30, new ECB(13, 115),
                new ECB(3, 116)),
            new ECBlocks(28, new ECB(2, 46),
                new ECB(29, 47)),
Severity: Major
Found in src/core/qrcode/decoder/Version.ts and 5 other locations - About 2 hrs to fix
src/core/qrcode/decoder/Version.ts on lines 264..272
src/core/qrcode/decoder/Version.ts on lines 273..281
src/core/qrcode/decoder/Version.ts on lines 282..290
src/core/qrcode/decoder/Version.ts on lines 308..316
src/core/qrcode/decoder/Version.ts on lines 317..325

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

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

BitMatrix has 24 functions (exceeds 20 allowed). Consider refactoring.
Open

export default class BitMatrix /*implements Cloneable*/ {

    /**
     * Creates an empty square {@link BitMatrix}.
     *
Severity: Minor
Found in src/core/common/BitMatrix.ts - About 2 hrs to fix

    Consider simplifying this complex logical expression.
    Open

            if (formats !== null && formats !== undefined) {
                const addOneDReader: boolean = formats.some(f =>
                    f === BarcodeFormat.UPC_A ||
                    f === BarcodeFormat.UPC_E ||
                    f === BarcodeFormat.EAN_13 ||
    Severity: Critical
    Found in src/core/MultiFormatReader.ts - About 2 hrs to fix

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

              new Version(27, Int32Array.from([6, 34, 62, 90, 118]),
                  new ECBlocks(30, new ECB(8, 122),
                      new ECB(4, 123)),
                  new ECBlocks(28, new ECB(22, 45),
                      new ECB(3, 46)),
      Severity: Major
      Found in src/core/qrcode/decoder/Version.ts and 4 other locations - About 2 hrs to fix
      src/core/qrcode/decoder/Version.ts on lines 219..227
      src/core/qrcode/decoder/Version.ts on lines 228..236
      src/core/qrcode/decoder/Version.ts on lines 237..245
      src/core/qrcode/decoder/Version.ts on lines 246..254

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

      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 5 locations. Consider refactoring.
      Open

              new Version(24, Int32Array.from([6, 28, 54, 80, 106]),
                  new ECBlocks(30, new ECB(6, 117),
                      new ECB(4, 118)),
                  new ECBlocks(28, new ECB(6, 45),
                      new ECB(14, 46)),
      Severity: Major
      Found in src/core/qrcode/decoder/Version.ts and 4 other locations - About 2 hrs to fix
      src/core/qrcode/decoder/Version.ts on lines 219..227
      src/core/qrcode/decoder/Version.ts on lines 237..245
      src/core/qrcode/decoder/Version.ts on lines 246..254
      src/core/qrcode/decoder/Version.ts on lines 255..263

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

      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 5 locations. Consider refactoring.
      Open

              new Version(25, Int32Array.from([6, 32, 58, 84, 110]),
                  new ECBlocks(26, new ECB(8, 106),
                      new ECB(4, 107)),
                  new ECBlocks(28, new ECB(8, 47),
                      new ECB(13, 48)),
      Severity: Major
      Found in src/core/qrcode/decoder/Version.ts and 4 other locations - About 2 hrs to fix
      src/core/qrcode/decoder/Version.ts on lines 219..227
      src/core/qrcode/decoder/Version.ts on lines 228..236
      src/core/qrcode/decoder/Version.ts on lines 246..254
      src/core/qrcode/decoder/Version.ts on lines 255..263

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

      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 5 locations. Consider refactoring.
      Open

              new Version(23, Int32Array.from([6, 30, 54, 78, 102]),
                  new ECBlocks(30, new ECB(4, 121),
                      new ECB(5, 122)),
                  new ECBlocks(28, new ECB(4, 47),
                      new ECB(14, 48)),
      Severity: Major
      Found in src/core/qrcode/decoder/Version.ts and 4 other locations - About 2 hrs to fix
      src/core/qrcode/decoder/Version.ts on lines 228..236
      src/core/qrcode/decoder/Version.ts on lines 237..245
      src/core/qrcode/decoder/Version.ts on lines 246..254
      src/core/qrcode/decoder/Version.ts on lines 255..263

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

      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 5 locations. Consider refactoring.
      Open

              new Version(26, Int32Array.from([6, 30, 58, 86, 114]),
                  new ECBlocks(28, new ECB(10, 114),
                      new ECB(2, 115)),
                  new ECBlocks(28, new ECB(19, 46),
                      new ECB(4, 47)),
      Severity: Major
      Found in src/core/qrcode/decoder/Version.ts and 4 other locations - About 2 hrs to fix
      src/core/qrcode/decoder/Version.ts on lines 219..227
      src/core/qrcode/decoder/Version.ts on lines 228..236
      src/core/qrcode/decoder/Version.ts on lines 237..245
      src/core/qrcode/decoder/Version.ts on lines 255..263

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

      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