zxing-js/library

View on GitHub

Showing 353 of 958 total issues

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

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

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

        for (const ecBlock of ecBlockArray) {
            for (let i = 0; i < ecBlock.getCount(); i++) {
                const numDataCodewords = ecBlock.getDataCodewords();
                const numBlockCodewords = ecBlocks.getECCodewordsPerBlock() + numDataCodewords;
                result[numResultBlocks++] = new DataBlock(numDataCodewords, new Uint8Array(numBlockCodewords));
Severity: Major
Found in src/core/qrcode/decoder/DataBlock.ts and 1 other location - About 2 hrs to fix
src/core/datamatrix/decoder/DataBlock.ts on lines 63..69

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

    for (let ecBlock of ecBlockArray) {
      for (let i = 0; i < ecBlock.getCount(); i++) {
        const numDataCodewords = ecBlock.getDataCodewords();
        const numBlockCodewords = ecBlocks.getECCodewords() + numDataCodewords;
        result[numResultBlocks++] = new DataBlock(numDataCodewords, new Uint8Array(numBlockCodewords));
Severity: Major
Found in src/core/datamatrix/decoder/DataBlock.ts and 1 other location - About 2 hrs to fix
src/core/qrcode/decoder/DataBlock.ts on lines 70..76

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

        new Version(18, Int32Array.from([6, 30, 56, 82]),
            new ECBlocks(30, new ECB(5, 120),
                new ECB(1, 121)),
            new ECBlocks(26, new ECB(9, 43),
                new ECB(4, 44)),
Severity: Major
Found in src/core/qrcode/decoder/Version.ts and 6 other locations - About 2 hrs to fix
src/core/qrcode/decoder/Version.ts on lines 141..149
src/core/qrcode/decoder/Version.ts on lines 150..158
src/core/qrcode/decoder/Version.ts on lines 159..167
src/core/qrcode/decoder/Version.ts on lines 168..176
src/core/qrcode/decoder/Version.ts on lines 186..194
src/core/qrcode/decoder/Version.ts on lines 195..203

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

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

        new Version(14, Int32Array.from([6, 26, 46, 66]),
            new ECBlocks(30, new ECB(3, 115),
                new ECB(1, 116)),
            new ECBlocks(24, new ECB(4, 40),
                new ECB(5, 41)),
Severity: Major
Found in src/core/qrcode/decoder/Version.ts and 6 other locations - About 2 hrs to fix
src/core/qrcode/decoder/Version.ts on lines 150..158
src/core/qrcode/decoder/Version.ts on lines 159..167
src/core/qrcode/decoder/Version.ts on lines 168..176
src/core/qrcode/decoder/Version.ts on lines 177..185
src/core/qrcode/decoder/Version.ts on lines 186..194
src/core/qrcode/decoder/Version.ts on lines 195..203

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

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

        new Version(16, Int32Array.from([6, 26, 50, 74]),
            new ECBlocks(24, new ECB(5, 98),
                new ECB(1, 99)),
            new ECBlocks(28, new ECB(7, 45),
                new ECB(3, 46)),
Severity: Major
Found in src/core/qrcode/decoder/Version.ts and 6 other locations - About 2 hrs to fix
src/core/qrcode/decoder/Version.ts on lines 141..149
src/core/qrcode/decoder/Version.ts on lines 150..158
src/core/qrcode/decoder/Version.ts on lines 168..176
src/core/qrcode/decoder/Version.ts on lines 177..185
src/core/qrcode/decoder/Version.ts on lines 186..194
src/core/qrcode/decoder/Version.ts on lines 195..203

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

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

        new Version(20, Int32Array.from([6, 34, 62, 90]),
            new ECBlocks(28, new ECB(3, 107),
                new ECB(5, 108)),
            new ECBlocks(26, new ECB(3, 41),
                new ECB(13, 42)),
Severity: Major
Found in src/core/qrcode/decoder/Version.ts and 6 other locations - About 2 hrs to fix
src/core/qrcode/decoder/Version.ts on lines 141..149
src/core/qrcode/decoder/Version.ts on lines 150..158
src/core/qrcode/decoder/Version.ts on lines 159..167
src/core/qrcode/decoder/Version.ts on lines 168..176
src/core/qrcode/decoder/Version.ts on lines 177..185
src/core/qrcode/decoder/Version.ts on lines 186..194

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

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

        new Version(17, Int32Array.from([6, 30, 54, 78]),
            new ECBlocks(28, new ECB(1, 107),
                new ECB(5, 108)),
            new ECBlocks(28, new ECB(10, 46),
                new ECB(1, 47)),
Severity: Major
Found in src/core/qrcode/decoder/Version.ts and 6 other locations - About 2 hrs to fix
src/core/qrcode/decoder/Version.ts on lines 141..149
src/core/qrcode/decoder/Version.ts on lines 150..158
src/core/qrcode/decoder/Version.ts on lines 159..167
src/core/qrcode/decoder/Version.ts on lines 177..185
src/core/qrcode/decoder/Version.ts on lines 186..194
src/core/qrcode/decoder/Version.ts on lines 195..203

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

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

        new Version(19, Int32Array.from([6, 30, 58, 86]),
            new ECBlocks(28, new ECB(3, 113),
                new ECB(4, 114)),
            new ECBlocks(26, new ECB(3, 44),
                new ECB(11, 45)),
Severity: Major
Found in src/core/qrcode/decoder/Version.ts and 6 other locations - About 2 hrs to fix
src/core/qrcode/decoder/Version.ts on lines 141..149
src/core/qrcode/decoder/Version.ts on lines 150..158
src/core/qrcode/decoder/Version.ts on lines 159..167
src/core/qrcode/decoder/Version.ts on lines 168..176
src/core/qrcode/decoder/Version.ts on lines 177..185
src/core/qrcode/decoder/Version.ts on lines 195..203

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

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