mangroveorg/datawinners

View on GitHub
datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js

Summary

Maintainability
F
3 wks
Test Coverage

File rules-tests.js has 758 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*global
    module:false,
    equal:false,
    notEqual:false,
    strictEqual:false,
Severity: Major
Found in datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js - About 1 day to fix

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

    test('Object is NOT Valid and number is observable and isValid returns False', function () {
        var number = ko.observable(true);
        var testObj = ko.observable('').extend({ number: number });
    
        testObj('stuff');
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 761..769
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 826..834
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 964..972

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

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

    test('Object is NOT Valid and digit is observable and isValid returns False', function () {
        var digit = ko.observable(true);
        var testObj = ko.observable('').extend({ digit: digit });
    
        testObj('stuff');
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 761..769
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 826..834
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 900..908

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

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

    test('Object is NOT Valid and dateISO is observable and isValid returns False', function () {
        var dateISO = ko.observable(true);
        var testObj = ko.observable('').extend({ dateISO: dateISO });
    
        testObj('stuff');
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 761..769
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 900..908
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 964..972

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

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

    test('Object is NOT Valid and isValid returns False', function () {
        var date = ko.observable(true);
        var testObj = ko.observable('').extend({ date: date });
    
        testObj('stuff');
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 826..834
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 900..908
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 964..972

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

    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

    test('Object is Valid and isValid returns True and max is observable', function () {
        var minValue = ko.observable(3);
        var testObj = ko.observable('')
                        .extend({ max: minValue });
    
    
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 152..161
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 620..629
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 1052..1060
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 1077..1085

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

    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

    test('Object is NOT Valid and isValid returns False', function () {
        var compareObj = ko.observable(12);
        var testObj = ko.observable('').extend({ equal: compareObj });
    
        testObj(11);
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 152..161
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 220..229
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 620..629
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 1077..1085

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

    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

    test('Object is NOT Valid and isValid returns False', function () {
        var compareObj = ko.observable(12);
        var testObj = ko.observable('').extend({ notEqual: compareObj });
    
        testObj(12);
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 152..161
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 220..229
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 620..629
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 1052..1060

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

    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

    test('Object is Valid and isValid returns True and min is observable', function () {
        var minValue = ko.observable(3);
        var testObj = ko.observable('')
                        .extend({ min: minValue });
    
    
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 220..229
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 620..629
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 1052..1060
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 1077..1085

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

    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

    test('Object is NOT Valid and step is observable and isValid returns False', function () {
        var step = ko.observable(3);
        var testObj = ko.observable('')
                        .extend({ step: step });
    
    
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 152..161
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 220..229
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 1052..1060
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 1077..1085

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

    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

    test('Object is NOT Valid and maxLength is observable and isValid returns False', function () {
        var maxLength = ko.observable(3);
        var testObj = ko.observable('')
                        .extend({ maxLength: maxLength });
    
    
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 312..321

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

    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

    test('Object is NOT Valid and minLength is observable and isValid returns False', function () {
        var minLength = ko.observable(12);
        var testObj = ko.observable('')
                        .extend({ minLength: minLength });
    
    
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 396..405

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

    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

    test('Object is NOT Valid and isValid returns False and min is observable', function () {
        var minValue = ko.observable(3);
        var testObj = ko.observable('')
                        .extend({ min: minValue });
    
    
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 209..218

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

    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

    test('Object is NOT Valid and isValid returns False and max is observable', function () {
        var minValue = ko.observable(3);
        var testObj = ko.observable('')
                        .extend({ max: minValue });
    
    
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 141..150

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

    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

    test('Object is Valid and date is observable and isValid returns True', function () {
        var date = ko.observable(true);
        var testObj = ko.observable('').extend({ date: date });
    
        testObj('11/18/2011');
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 686..694
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 816..824
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 890..898
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 1018..1026

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

    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

    test('Object is Valid and dateISO is observable and isValid returns True', function () {
        var dateISO = ko.observable(true);
        var testObj = ko.observable('').extend({ dateISO: dateISO });
    
        testObj('2011-11-18');
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 686..694
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 751..759
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 890..898
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 1018..1026

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

    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

    test('Object is Valid and phoneUS is observable and isValid returns True', function () {
        var phoneUS = ko.observable(true);
        var testObj = ko.observable('').extend({ phoneUS: phoneUS });
    
        testObj('765-523-4569');
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 686..694
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 751..759
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 816..824
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 890..898

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

    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

    test('Number is Valid (starting with point) and number is observable and isValid returns True', function () {
        var number = ko.observable(true);
        var testObj = ko.observable('').extend({ number: number });
    
        testObj(".15");
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 686..694
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 751..759
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 816..824
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 1018..1026

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

    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

    test('Object is Valid and email is observable and isValid returns True', function () {
        var email = ko.observable(true);
        var testObj = ko.observable('').extend({ email: email });
    
        testObj('test@example.com');
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 751..759
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 816..824
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 890..898
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 1018..1026

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

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

    test('Object is Valid and isValid returns True', function () {
        var compareObj = ko.observable(12);
        var testObj = ko.observable('').extend({ notEqual: compareObj });
    
        testObj(11);
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 609..618
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 1042..1050

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

    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

    test('Object is Valid and minLength is observable and isValid returns True', function () {
        var minLength = ko.observable(5);
        var testObj = ko.observable('')
                        .extend({ minLength: minLength });
    
    
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 385..394

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

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

    test('Object is Valid and isValid returns True', function () {
        var compareObj = ko.observable(12);
        var testObj = ko.observable('').extend({ equal: compareObj });
    
        testObj(12);
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 609..618
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 1067..1075

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

    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

    test('Object is Valid and maxLength is observable and isValid returns True', function () {
        var maxLength = ko.observable(20);
        var testObj = ko.observable('')
                        .extend({ maxLength: maxLength });
    
    
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 301..310

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

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

    test('Object is Valid and step is observable and isValid returns True', function () {
        var step = ko.observable(3);
        var testObj = ko.observable('')
                        .extend({ step: step });
    
    
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 1042..1050
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 1067..1075

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

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

    test('Object is NOT Valid and isValid returns False', function () {
        var testObj = ko.observable('').extend({ dateISO: true });
    
        testObj('stuff');
    
    
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 742..749
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 881..888
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 945..952

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

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

    test('Object is NOT Valid and isValid returns False', function () {
        var testObj = ko.observable('').extend({ digit: true });
    
        testObj('stuff');
    
    
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 742..749
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 807..814
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 881..888

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

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

    test('Object is NOT Valid and isValid returns False', function () {
        var testObj = ko.observable('').extend({ number: true });
    
        testObj('stuff');
    
    
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 742..749
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 807..814
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 945..952

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

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

    test('Object is NOT Valid and isValid returns False', function () {
        var testObj = ko.observable('').extend({ date: true });
    
        testObj('stuff');
    
    
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 807..814
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 881..888
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 945..952

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

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

    test('Object is NOT Valid and isValid returns False', function () {
        var testObj = ko.observable('')
                        .extend({ max: 5 });
    
        testObj(6);
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 131..139
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 557..565

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

    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

    test('Object is NOT Valid and isValid returns False', function () {
        var testObj = ko.observable('')
                        .extend({ minLength: 12 });
    
        testObj('something');
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 359..367

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

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

    test('Object is NOT Valid and isValid returns False', function () {
        var testObj = ko.observable('')
                        .extend({ min: 2 });
    
        testObj(1);
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 199..207
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 557..565

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

    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

    test('Pattern validation matches numbers', function () {
        var testObj = ko.observable('')
                        .extend({ pattern: '^12' });
    
        testObj(123);
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 464..472

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

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

    test('Object is NOT Valid and isValid returns False', function () {
        var testObj = ko.observable('')
                        .extend({ step: 2 });
    
        testObj(5);
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 131..139
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 199..207

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

    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

    test('Object is NOT Valid and isValid returns False', function () {
        var testObj = ko.observable('')
                        .extend({ maxLength: 6 });
    
        testObj('something');
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 275..283

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

    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

    test('Pattern validation mismatches numbers', function () {
        var testObj = ko.observable('')
                        .extend({ pattern: 'none' });
    
        testObj(123);
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 454..462

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

    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

    test('Object is Valid and isValid returns True', function () {
        var testObj = ko.observable('').extend({ dateISO: true });
    
        testObj('2011-11-18');
    
    
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 19..28
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 658..665
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 733..740
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 872..879
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 1000..1007

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

    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

    test('Number is Valid (starting with point) and isValid returns True', function () {
        var testObj = ko.observable('').extend({ number: true });
    
        testObj(".15");
    
    
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 19..28
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 658..665
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 733..740
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 798..805
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 1000..1007

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

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

    test('Object is Valid and isValid returns True', function () {
        var testObj = ko.observable('')
                        .extend({ max: 5 });
    
        testObj(3);
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 111..119
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 547..555
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 567..575

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

    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

    test('Object is Valid and isValid returns True', function () {
        var testObj = ko.observable('').extend({ phoneUS: true });
    
        testObj('765-523-4569');
    
    
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 19..28
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 658..665
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 733..740
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 798..805
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 872..879

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

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

    test('Object is Valid and isValid returns True', function () {
        var testObj = ko.observable('')
                        .extend({ min: 2 });
    
        testObj(3);
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 189..197
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 547..555
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 567..575

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

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

    test('Object is Valid and isValid returns True', function () {
        var testObj = ko.observable('')
                        .extend({ step: 3 });
    
        testObj(6);
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 111..119
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 189..197
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 567..575

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

    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

    test('Object is Valid and isValid returns True', function () {
    
        var testObj = ko.observable('')
                        .extend({ required: true });
    
    
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 658..665
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 733..740
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 798..805
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 872..879
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 1000..1007

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

    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

    test('Object is Valid and isValid returns True', function () {
        var testObj = ko.observable('').extend({ email: true });
    
        testObj('test@example.com');
    
    
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 19..28
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 733..740
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 798..805
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 872..879
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 1000..1007

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

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

    test('Issue 74 - Object is Valid with a step of 0.1 and isValid returns True', function () {
        var testObj = ko.observable('')
                        .extend({ step: 0.1 });
    
        testObj(6);
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 111..119
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 189..197
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 547..555

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

    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

    test('Object is Valid and isValid returns True', function () {
        var testObj = ko.observable('').extend({ date: true });
    
        testObj('11/18/2011');
    
    
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 19..28
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 658..665
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 798..805
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 872..879
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 1000..1007

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

    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

    test('Issue #33 - Arrays - Invalid', function () {
        var testObj = ko.observableArray()
                        .extend({ minLength: 4 });
    
        testObj(['one', 'two', 'three']);
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 377..383

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

    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

    test('Issue #33 - Arrays - Invalid', function () {
        var testObj = ko.observableArray()
                        .extend({ maxLength: 2 });
    
        testObj(['one', 'two', 'three']);
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 293..299

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

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

    test('Object is Valid and isValid returns True', function () {
        var testObj = ko.observable('')
                        .extend({ minLength: 5 });
    
        testObj('something');
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 121..129
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 349..357

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

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

    test('Object is Valid and isValid returns True', function () {
        var testObj = ko.observable('')
                        .extend({ maxLength: 10 });
    
        testObj('something');
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 121..129
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 265..273

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

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

    test('Object is Valid and isValid returns True (with min: 0)', function () {
        var testObj = ko.observable('')
                .extend({ min: 0 });
    
        testObj("0");
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 265..273
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 349..357

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

    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

    test('Object is Valid and isValid returns True', function () {
        var testObj = ko.observable('').extend({ digit: true });
    
        testObj(2);
    
    
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 863..870

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

    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

    test('Object is Valid and isValid returns True', function () {
        var testObj = ko.observable('').extend({ number: true });
    
        testObj(200.01);
    
    
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 936..943

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

    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

    test('Empty spaces is not a valid value for required', function () {
    
        var testObj = ko.observable('  ')
                        .extend({ required: true });
    
    
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 30..37

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

    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

    test('Object is NOT Valid and isValid returns False', function () {
    
        var testObj = ko.observable('')
                        .extend({ required: true });
    
    
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 48..55

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

    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

    test('Issue #33 - Arrays - Valid', function () {
        var testObj = ko.observableArray()
                        .extend({ minLength: 2 });
    
        testObj(['one', 'two', 'three']);
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 369..375

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

    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

    test('Issue #33 - Arrays - Valid', function () {
        var testObj = ko.observableArray()
                        .extend({ maxLength: 4 });
    
        testObj(['one', 'two', 'three']);
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 285..291

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

    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

    test('Object is Valid when empty string is present - Preserves Optional Properties', function () {
    
        var testObj = ko.observable().extend({ max: 2 });
        testObj('');
        ok(testObj.isValid(), 'testObj is Valid');
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 104..109
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 250..255
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 257..263
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 342..347
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 540..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 63.

    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

    test('Object is Valid when empty string is present - Preserves Optional Properties', function () {
    
        var testObj = ko.observable().extend({ step: 2 });
        testObj('');
        ok(testObj.isValid(), 'testObj is Valid');
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 104..109
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 182..187
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 250..255
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 257..263
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 342..347

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

    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

    test('Object is Valid when no value is present - Preserves Optional Properties', function () {
    
        var testObj = ko.observable().extend({ minLength: 2 });
        testObj('');
        ok(testObj.isValid(), 'testObj is Valid');
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 104..109
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 182..187
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 250..255
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 342..347
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 540..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 63.

    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

    test('Object is Valid when null value is present - Preserves Optional Properties', function () {
    
        var testObj = ko.observable().extend({ step: 2 });
        testObj(null);
        ok(testObj.isValid(), 'testObj is Valid');
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 97..102
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 175..180
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 243..248
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 335..340

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

    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

    test('Object is Valid when empty string is present - Preserves Optional Properties', function () {
    
        var testObj = ko.observable().extend({ min: 2 });
        testObj('');
        ok(testObj.isValid(), 'testObj is Valid');
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 182..187
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 250..255
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 257..263
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 342..347
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 540..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 63.

    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

    test('Object is Valid when null value is present - Preserves Optional Properties', function () {
    
        var testObj = ko.observable().extend({ minLength: 2 });
        testObj(null);
        ok(testObj.isValid(), 'testObj is Valid');
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 97..102
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 175..180
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 335..340
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 533..538

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

    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

    test('Object is Valid when empty string is present - Preserves Optional Properties', function () {
    
        var testObj = ko.observable().extend({ maxLength: 2 });
        testObj('');
        ok(testObj.isValid(), 'testObj is Valid');
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 104..109
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 182..187
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 250..255
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 257..263
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 540..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 63.

    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

    test('Object is Valid when null value is present - Preserves Optional Properties', function () {
    
        var testObj = ko.observable().extend({ max: 2 });
        testObj(null);
        ok(testObj.isValid(), 'testObj is Valid');
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 97..102
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 243..248
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 335..340
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 533..538

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

    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

    test('Object is Valid when null value is present - Preserves Optional Properties', function () {
    
        var testObj = ko.observable().extend({ maxLength: 2 });
        testObj(null);
        ok(testObj.isValid(), 'testObj is Valid');
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 97..102
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 175..180
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 243..248
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 533..538

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

    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

    test('Object is Valid when null value is present - Preserves Optional Properties', function () {
    
        var testObj = ko.observable().extend({ min: 2 });
        testObj(null);
        ok(testObj.isValid(), 'testObj is Valid');
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 175..180
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 243..248
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 335..340
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 533..538

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

    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

    test('Object is Valid when empty string is present - Preserves Optional Properties', function () {
    
        var testObj = ko.observable().extend({ minLength: 2 });
        testObj('');
        ok(testObj.isValid(), 'testObj is Valid');
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 104..109
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 182..187
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 257..263
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 342..347
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 540..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 63.

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

    test('Object is Valid when empty string is present - Preserves Optional Properties', function () {
    
        var testObj = ko.observable().extend({ digit: true });
        testObj('');
        ok(testObj.isValid(), 'testObj is Valid');
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 651..656
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 856..861
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 993..998

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

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

    test('Object is Valid when null value is present - Preserves Optional Properties', function () {
    
        var testObj = ko.observable().extend({ date: 'test' });
        testObj(null);
        ok(testObj.isValid(), 'testObj is Valid');
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 420..425
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 784..789

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

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

    test('Object is Valid when null value is present - Preserves Optional Properties', function () {
    
        var testObj = ko.observable().extend({ digit: true });
        testObj(null);
        ok(testObj.isValid(), 'testObj is Valid');
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 644..649
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 849..854
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 986..991

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

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

    test('Object is Valid when null value is present - Preserves Optional Properties', function () {
    
        var testObj = ko.observable().extend({ number: true });
        testObj(null);
        ok(testObj.isValid(), 'testObj is Valid');
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 644..649
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 922..927
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 986..991

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

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

    test('Object is Valid when null value is present - Preserves Optional Properties', function () {
    
        var testObj = ko.observable().extend({ phoneUS: true });
        testObj(null);
        ok(testObj.isValid(), 'testObj is Valid');
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 644..649
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 849..854
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 922..927

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

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

    test('Object is Valid when empty string is present - Preserves Optional Properties', function () {
    
        var testObj = ko.observable().extend({ email: true });
        testObj('');
        ok(testObj.isValid(), 'testObj is Valid');
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 856..861
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 929..934
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 993..998

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

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

    test('Object is Valid when empty string is present - Preserves Optional Properties', function () {
    
        var testObj = ko.observable().extend({ phoneUS: true });
        testObj('');
        ok(testObj.isValid(), 'testObj is Valid');
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 651..656
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 856..861
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 929..934

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

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

    test('Object is Valid when null value is present - Preserves Optional Properties', function () {
    
        var testObj = ko.observable().extend({ pattern: 'test' });
        testObj(null);
        ok(testObj.isValid(), 'testObj is Valid');
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 719..724
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 784..789

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

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

    test('Object is Valid when empty string is present - Preserves Optional Properties', function () {
    
        var testObj = ko.observable().extend({ date: 'test' });
        testObj('');
        ok(testObj.isValid(), 'testObj is Valid');
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 427..432
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 791..796

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

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

    test('Object is Valid when empty string is present - Preserves Optional Properties', function () {
    
        var testObj = ko.observable().extend({ dateISO: 'test' });
        testObj('');
        ok(testObj.isValid(), 'testObj is Valid');
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 427..432
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 726..731

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

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

    test('Object is Valid when null value is present - Preserves Optional Properties', function () {
    
        var testObj = ko.observable().extend({ email: true });
        testObj(null);
        ok(testObj.isValid(), 'testObj is Valid');
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 849..854
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 922..927
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 986..991

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

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

    test('Object is Valid when empty string is present - Preserves Optional Properties', function () {
    
        var testObj = ko.observable().extend({ number: true });
        testObj('');
        ok(testObj.isValid(), 'testObj is Valid');
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 651..656
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 929..934
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 993..998

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

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

    test('Object is Valid when null value is present - Preserves Optional Properties', function () {
    
        var testObj = ko.observable().extend({ dateISO: 'test' });
        testObj(null);
        ok(testObj.isValid(), 'testObj is Valid');
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 420..425
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 719..724

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

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

    test('Object is Valid when empty string is present - Preserves Optional Properties', function () {
    
        var testObj = ko.observable().extend({ pattern: 'test' });
        testObj('');
        ok(testObj.isValid(), 'testObj is Valid');
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 726..731
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 791..796

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

    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

    test('Object is Valid when observable has not been initialized - Preserves Optional Properties', function () {
    
        var testObj = ko.observable().extend({ min: 2 });
        testObj();
        ok(testObj.isValid(), 'testObj is Valid');
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 168..173
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 236..241
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 328..333
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 526..531

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

    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

    test('Object is Valid when observable has not been initialized - Preserves Optional Properties', function () {
    
        var testObj = ko.observable().extend({ step: 2 });
        testObj();
        ok(testObj.isValid(), 'testObj is Valid');
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 90..95
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 168..173
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 236..241
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 328..333

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

    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

    test('Object is Valid when observable has not been initialized - Preserves Optional Properties', function () {
    
        var testObj = ko.observable().extend({ max: 2 });
        testObj();
        ok(testObj.isValid(), 'testObj is Valid');
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 90..95
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 236..241
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 328..333
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 526..531

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

    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

    test('Object is Valid when observable has not been initialized - Preserves Optional Properties', function () {
    
        var testObj = ko.observable().extend({ maxLength: 2 });
        testObj();
        ok(testObj.isValid(), 'testObj is Valid');
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 90..95
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 168..173
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 236..241
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 526..531

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

    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

    test('Object is Valid when observable has not been initialized - Preserves Optional Properties', function () {
    
        var testObj = ko.observable().extend({ minLength: 2 });
        testObj();
        ok(testObj.isValid(), 'testObj is Valid');
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 90..95
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 168..173
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 328..333
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 526..531

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

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

    test('Object is Valid when observable has not been initialized - Preserves Optional Properties', function () {
    
        var testObj = ko.observable().extend({ date: 'test' });
        testObj();
        ok(testObj.isValid(), 'testObj is Valid');
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 413..418
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 777..782

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

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

    test('Object is Valid when observable has not been initialized - Preserves Optional Properties', function () {
    
        var testObj = ko.observable().extend({ phoneUS: true });
        testObj();
        ok(testObj.isValid(), 'testObj is Valid');
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 637..642
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 842..847
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 915..920

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

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

    test('Object is Valid when observable has not been initialized - Preserves Optional Properties', function () {
    
        var testObj = ko.observable().extend({ pattern: 'test' });
        testObj();
        ok(testObj.isValid(), 'testObj is Valid');
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 712..717
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 777..782

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

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

    test('Object is Valid when observable has not been initialized - Preserves Optional Properties', function () {
    
        var testObj = ko.observable().extend({ number: true });
        testObj();
        ok(testObj.isValid(), 'testObj is Valid');
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 637..642
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 915..920
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 979..984

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

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

    test('Object is Valid when observable has not been initialized - Preserves Optional Properties', function () {
    
        var testObj = ko.observable().extend({ email: true });
        testObj();
        ok(testObj.isValid(), 'testObj is Valid');
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 842..847
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 915..920
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 979..984

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

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

    test('Object is Valid when observable has not been initialized - Preserves Optional Properties', function () {
    
        var testObj = ko.observable().extend({ dateISO: 'test' });
        testObj();
        ok(testObj.isValid(), 'testObj is Valid');
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 413..418
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 712..717

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

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

    test('Object is Valid when observable has not been initialized - Preserves Optional Properties', function () {
    
        var testObj = ko.observable().extend({ digit: true });
        testObj();
        ok(testObj.isValid(), 'testObj is Valid');
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 637..642
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 842..847
    datawinners/media/javascript/Knockout-Validation/Tests/rules-tests.js on lines 979..984

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

    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