amzn/style-dictionary

View on GitHub
__tests__/common/transforms.test.js

Summary

Maintainability
F
2 wks
Test Coverage

File transforms.test.js has 553 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*
 * Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
Severity: Major
Found in __tests__/common/transforms.test.js - About 1 day to fix

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

        describe('color/UIColor', () => {
          it('should handle normal colors', () => {
            var value = transforms["color/UIColor"].transformer({
              value: "#aaaaaa"
            });
    Severity: Major
    Found in __tests__/common/transforms.test.js and 1 other location - About 6 hrs to fix
    __tests__/common/transforms.test.js on lines 383..404

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

    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

        describe('color/UIColorSwift', () => {
          it('should handle normal colors', () => {
            var value = transforms["color/UIColorSwift"].transformer({
              value: "#aaaaaa"
            });
    Severity: Major
    Found in __tests__/common/transforms.test.js and 1 other location - About 6 hrs to fix
    __tests__/common/transforms.test.js on lines 360..381

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

    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

        describe('size/sp', () => {
          it('should work', () => {
            var value = transforms["size/sp"].transformer({
              value: "12px"
            });
    Severity: Major
    Found in __tests__/common/transforms.test.js and 1 other location - About 5 hrs to fix
    __tests__/common/transforms.test.js on lines 471..485

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

    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

        describe('size/dp', () => {
          it('should work', () => {
            var value = transforms["size/dp"].transformer({
              value: "12px"
            });
    Severity: Major
    Found in __tests__/common/transforms.test.js and 1 other location - About 5 hrs to fix
    __tests__/common/transforms.test.js on lines 455..469

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

    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

        describe('name/ti/camel', () => {
          it('should handle prefix', () => {
            expect(transforms["name/ti/camel"].transformer(
              {
                path: ['one','two','three']
    Severity: Major
    Found in __tests__/common/transforms.test.js and 5 other locations - About 4 hrs to fix
    __tests__/common/transforms.test.js on lines 21..40
    __tests__/common/transforms.test.js on lines 63..82
    __tests__/common/transforms.test.js on lines 84..103
    __tests__/common/transforms.test.js on lines 105..124
    __tests__/common/transforms.test.js on lines 126..145

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

    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

        describe('name/cti/camel', () => {
          it('should handle prefix', () => {
            expect(transforms["name/cti/camel"].transformer(
              {
                path: ['one','two','three']
    Severity: Major
    Found in __tests__/common/transforms.test.js and 5 other locations - About 4 hrs to fix
    __tests__/common/transforms.test.js on lines 42..61
    __tests__/common/transforms.test.js on lines 63..82
    __tests__/common/transforms.test.js on lines 84..103
    __tests__/common/transforms.test.js on lines 105..124
    __tests__/common/transforms.test.js on lines 126..145

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

    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

        describe('name/cti/constant', () => {
          it('should handle prefix', () => {
            expect(transforms["name/cti/constant"].transformer(
              {
                path: ['one','two','three']
    Severity: Major
    Found in __tests__/common/transforms.test.js and 5 other locations - About 4 hrs to fix
    __tests__/common/transforms.test.js on lines 21..40
    __tests__/common/transforms.test.js on lines 42..61
    __tests__/common/transforms.test.js on lines 63..82
    __tests__/common/transforms.test.js on lines 84..103
    __tests__/common/transforms.test.js on lines 126..145

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

    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

        describe('name/cti/snake', () => {
          it('should handle prefix', () => {
            expect(transforms["name/cti/snake"].transformer(
              {
                path: ['one','two','three']
    Severity: Major
    Found in __tests__/common/transforms.test.js and 5 other locations - About 4 hrs to fix
    __tests__/common/transforms.test.js on lines 21..40
    __tests__/common/transforms.test.js on lines 42..61
    __tests__/common/transforms.test.js on lines 63..82
    __tests__/common/transforms.test.js on lines 105..124
    __tests__/common/transforms.test.js on lines 126..145

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

    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

        describe('name/cti/kebab', () => {
          it('should handle prefix', () => {
            expect(transforms["name/cti/kebab"].transformer(
              {
                path: ['one','two','three']
    Severity: Major
    Found in __tests__/common/transforms.test.js and 5 other locations - About 4 hrs to fix
    __tests__/common/transforms.test.js on lines 21..40
    __tests__/common/transforms.test.js on lines 42..61
    __tests__/common/transforms.test.js on lines 84..103
    __tests__/common/transforms.test.js on lines 105..124
    __tests__/common/transforms.test.js on lines 126..145

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

    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

        describe('name/ti/constant', () => {
          it('should handle prefix', () => {
            expect(transforms["name/ti/constant"].transformer(
              {
                path: ['one','two','three']
    Severity: Major
    Found in __tests__/common/transforms.test.js and 5 other locations - About 4 hrs to fix
    __tests__/common/transforms.test.js on lines 21..40
    __tests__/common/transforms.test.js on lines 42..61
    __tests__/common/transforms.test.js on lines 63..82
    __tests__/common/transforms.test.js on lines 84..103
    __tests__/common/transforms.test.js on lines 105..124

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

    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

        describe('color/rgb', () => {
          it('should handle normal colors', () => {
            var value = transforms["color/rgb"].transformer({
              value: "#aaaaaa"
            });
    Severity: Major
    Found in __tests__/common/transforms.test.js and 5 other locations - About 4 hrs to fix
    __tests__/common/transforms.test.js on lines 296..310
    __tests__/common/transforms.test.js on lines 328..342
    __tests__/common/transforms.test.js on lines 344..358
    __tests__/common/transforms.test.js on lines 406..420
    __tests__/common/transforms.test.js on lines 422..436

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

    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

        describe('color/hsl-4', () => {
          it('should handle normal colors', () => {
            var value = transforms["color/hsl-4"].transformer({
              value: "#009688"
            });
    Severity: Major
    Found in __tests__/common/transforms.test.js and 5 other locations - About 4 hrs to fix
    __tests__/common/transforms.test.js on lines 296..310
    __tests__/common/transforms.test.js on lines 312..326
    __tests__/common/transforms.test.js on lines 344..358
    __tests__/common/transforms.test.js on lines 406..420
    __tests__/common/transforms.test.js on lines 422..436

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

    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

        describe('color/css', () => {
          it('should handle normal colors', () => {
            var value = transforms["color/css"].transformer({
              value: "rgb(170, 170, 170)"
            });
    Severity: Major
    Found in __tests__/common/transforms.test.js and 5 other locations - About 4 hrs to fix
    __tests__/common/transforms.test.js on lines 296..310
    __tests__/common/transforms.test.js on lines 312..326
    __tests__/common/transforms.test.js on lines 328..342
    __tests__/common/transforms.test.js on lines 344..358
    __tests__/common/transforms.test.js on lines 406..420

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

    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

        describe('color/hsl', () => {
          it('should handle normal colors', () => {
            var value = transforms["color/hsl"].transformer({
              value: "#009688"
            });
    Severity: Major
    Found in __tests__/common/transforms.test.js and 5 other locations - About 4 hrs to fix
    __tests__/common/transforms.test.js on lines 296..310
    __tests__/common/transforms.test.js on lines 312..326
    __tests__/common/transforms.test.js on lines 328..342
    __tests__/common/transforms.test.js on lines 406..420
    __tests__/common/transforms.test.js on lines 422..436

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

    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

        describe('color/hex8android', () => {
          it('should handle colors without alpha', () => {
            var value = transforms["color/hex8android"].transformer({
              value: "#aaaaaa"
            });
    Severity: Major
    Found in __tests__/common/transforms.test.js and 5 other locations - About 4 hrs to fix
    __tests__/common/transforms.test.js on lines 312..326
    __tests__/common/transforms.test.js on lines 328..342
    __tests__/common/transforms.test.js on lines 344..358
    __tests__/common/transforms.test.js on lines 406..420
    __tests__/common/transforms.test.js on lines 422..436

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

    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

        describe('color/hex8flutter', () => {
          it('should handle colors without alpha', () => {
            var value = transforms["color/hex8flutter"].transformer({
              value: "#aaaaaa"
            });
    Severity: Major
    Found in __tests__/common/transforms.test.js and 5 other locations - About 4 hrs to fix
    __tests__/common/transforms.test.js on lines 296..310
    __tests__/common/transforms.test.js on lines 312..326
    __tests__/common/transforms.test.js on lines 328..342
    __tests__/common/transforms.test.js on lines 344..358
    __tests__/common/transforms.test.js on lines 422..436

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

    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

        describe('size/px', () => {
          it('should work', () => {
            var value = transforms["size/px"].transformer({
              value: "10"
            });
    Severity: Major
    Found in __tests__/common/transforms.test.js and 5 other locations - About 3 hrs to fix
    __tests__/common/transforms.test.js on lines 487..497
    __tests__/common/transforms.test.js on lines 499..509
    __tests__/common/transforms.test.js on lines 523..533
    __tests__/common/transforms.test.js on lines 535..545
    __tests__/common/transforms.test.js on lines 547..557

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

    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

        describe('size/remToDp', () => {
          it('should work', () => {
            var value = transforms["size/remToDp"].transformer({
              value: "1"
            });
    Severity: Major
    Found in __tests__/common/transforms.test.js and 5 other locations - About 3 hrs to fix
    __tests__/common/transforms.test.js on lines 487..497
    __tests__/common/transforms.test.js on lines 511..521
    __tests__/common/transforms.test.js on lines 523..533
    __tests__/common/transforms.test.js on lines 535..545
    __tests__/common/transforms.test.js on lines 547..557

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

    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

        describe('size/remToPx', () => {
          it('should work', () => {
            var value = transforms["size/remToPx"].transformer({
              value: "1"
            });
    Severity: Major
    Found in __tests__/common/transforms.test.js and 5 other locations - About 3 hrs to fix
    __tests__/common/transforms.test.js on lines 487..497
    __tests__/common/transforms.test.js on lines 499..509
    __tests__/common/transforms.test.js on lines 511..521
    __tests__/common/transforms.test.js on lines 523..533
    __tests__/common/transforms.test.js on lines 547..557

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

    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

        describe('size/remToSp', () => {
          it('should work', () => {
            var value = transforms["size/remToSp"].transformer({
              value: "1"
            });
    Severity: Major
    Found in __tests__/common/transforms.test.js and 5 other locations - About 3 hrs to fix
    __tests__/common/transforms.test.js on lines 499..509
    __tests__/common/transforms.test.js on lines 511..521
    __tests__/common/transforms.test.js on lines 523..533
    __tests__/common/transforms.test.js on lines 535..545
    __tests__/common/transforms.test.js on lines 547..557

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

    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

        describe('size/rem', () => {
          it('should work', () => {
            var value = transforms["size/rem"].transformer({
              value: "1"
            });
    Severity: Major
    Found in __tests__/common/transforms.test.js and 5 other locations - About 3 hrs to fix
    __tests__/common/transforms.test.js on lines 487..497
    __tests__/common/transforms.test.js on lines 499..509
    __tests__/common/transforms.test.js on lines 511..521
    __tests__/common/transforms.test.js on lines 523..533
    __tests__/common/transforms.test.js on lines 535..545

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

    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

        describe('size/remToPt', () => {
          it('should work', () => {
            var value = transforms["size/remToPt"].transformer({
              value: "1"
            });
    Severity: Major
    Found in __tests__/common/transforms.test.js and 5 other locations - About 3 hrs to fix
    __tests__/common/transforms.test.js on lines 487..497
    __tests__/common/transforms.test.js on lines 499..509
    __tests__/common/transforms.test.js on lines 511..521
    __tests__/common/transforms.test.js on lines 535..545
    __tests__/common/transforms.test.js on lines 547..557

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

    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

          it('should handle hsl colors', () => {
            var value = transforms["color/hex"].transformer({
              value: {
                h: '0',
                s: '0',
    Severity: Major
    Found in __tests__/common/transforms.test.js and 1 other location - About 3 hrs to fix
    __tests__/common/transforms.test.js on lines 237..250

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

    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

          it('should handle rgb (object) colors', () => {
            var value = transforms["color/hex"].transformer({
              value: {
                r: '170',
                g: '170',
    Severity: Major
    Found in __tests__/common/transforms.test.js and 1 other location - About 3 hrs to fix
    __tests__/common/transforms.test.js on lines 252..265

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

    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

        describe('asset/objC/literal', () => {
          it('should work', () => {
            var value = transforms["asset/objC/literal"].transformer({
              value: "hello"
            });
    Severity: Major
    Found in __tests__/common/transforms.test.js and 6 other locations - About 1 hr to fix
    __tests__/common/transforms.test.js on lines 559..566
    __tests__/common/transforms.test.js on lines 568..575
    __tests__/common/transforms.test.js on lines 577..584
    __tests__/common/transforms.test.js on lines 586..593
    __tests__/common/transforms.test.js on lines 604..611
    __tests__/common/transforms.test.js on lines 613..620

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

    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

        describe('size/flutter/remToDouble', () => {
          it('should work', () => {
            var value = transforms["size/flutter/remToDouble"].transformer({
              value: "1"
            });
    Severity: Major
    Found in __tests__/common/transforms.test.js and 6 other locations - About 1 hr to fix
    __tests__/common/transforms.test.js on lines 568..575
    __tests__/common/transforms.test.js on lines 577..584
    __tests__/common/transforms.test.js on lines 586..593
    __tests__/common/transforms.test.js on lines 595..602
    __tests__/common/transforms.test.js on lines 604..611
    __tests__/common/transforms.test.js on lines 613..620

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

    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

        describe('content/quote', () => {
          it('should work', () => {
            var value = transforms["content/quote"].transformer({
              value: "hello"
            });
    Severity: Major
    Found in __tests__/common/transforms.test.js and 6 other locations - About 1 hr to fix
    __tests__/common/transforms.test.js on lines 559..566
    __tests__/common/transforms.test.js on lines 577..584
    __tests__/common/transforms.test.js on lines 586..593
    __tests__/common/transforms.test.js on lines 595..602
    __tests__/common/transforms.test.js on lines 604..611
    __tests__/common/transforms.test.js on lines 613..620

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

    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

        describe('font/objC/literal', () => {
          it('should work', () => {
            var value = transforms["font/objC/literal"].transformer({
              value: "hello"
            });
    Severity: Major
    Found in __tests__/common/transforms.test.js and 6 other locations - About 1 hr to fix
    __tests__/common/transforms.test.js on lines 559..566
    __tests__/common/transforms.test.js on lines 568..575
    __tests__/common/transforms.test.js on lines 577..584
    __tests__/common/transforms.test.js on lines 586..593
    __tests__/common/transforms.test.js on lines 595..602
    __tests__/common/transforms.test.js on lines 613..620

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

    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

        describe('content/icon', () => {
          it('should work', () => {
            var value = transforms["content/icon"].transformer({
              value: ""
            });
    Severity: Major
    Found in __tests__/common/transforms.test.js and 6 other locations - About 1 hr to fix
    __tests__/common/transforms.test.js on lines 559..566
    __tests__/common/transforms.test.js on lines 568..575
    __tests__/common/transforms.test.js on lines 586..593
    __tests__/common/transforms.test.js on lines 595..602
    __tests__/common/transforms.test.js on lines 604..611
    __tests__/common/transforms.test.js on lines 613..620

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

    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

        describe('content/objC/literal', () => {
          it('should work', () => {
            var value = transforms["content/objC/literal"].transformer({
              value: "hello"
            });
    Severity: Major
    Found in __tests__/common/transforms.test.js and 6 other locations - About 1 hr to fix
    __tests__/common/transforms.test.js on lines 559..566
    __tests__/common/transforms.test.js on lines 568..575
    __tests__/common/transforms.test.js on lines 577..584
    __tests__/common/transforms.test.js on lines 595..602
    __tests__/common/transforms.test.js on lines 604..611
    __tests__/common/transforms.test.js on lines 613..620

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

    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

        describe('time/seconds', () => {
          it('should work', () => {
            var value = transforms["time/seconds"].transformer({
              value: "1000"
            });
    Severity: Major
    Found in __tests__/common/transforms.test.js and 6 other locations - About 1 hr to fix
    __tests__/common/transforms.test.js on lines 559..566
    __tests__/common/transforms.test.js on lines 568..575
    __tests__/common/transforms.test.js on lines 577..584
    __tests__/common/transforms.test.js on lines 586..593
    __tests__/common/transforms.test.js on lines 595..602
    __tests__/common/transforms.test.js on lines 604..611

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

    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

    There are no issues that match your filters.

    Category
    Status