adobe/brackets

View on GitHub

Showing 3,294 of 3,294 total issues

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

        if ( factor.from.x !== factor.to.x ) {
            props = props.concat( hProps );
            el.from = $.effects.setTransition( el, hProps, factor.from.x, el.from );
            el.to = $.effects.setTransition( el, hProps, factor.to.x, el.to );
        }
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/jquery.effects.scale.js on lines 171..175

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

        if ( factor.from.y !== factor.to.y ) {
            props = props.concat( cProps );
            el.from = $.effects.setTransition( el, cProps, factor.from.y, el.from );
            el.to = $.effects.setTransition( el, cProps, factor.to.y, el.to );
        }
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/jquery.effects.scale.js on lines 160..164

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

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

File main.js has 343 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*
 * Copyright (c) 2012 - present Adobe Systems Incorporated. All rights reserved.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the "Software"),
Severity: Minor
Found in src/extensions/default/HTMLCodeHints/main.js - About 4 hrs to fix

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

                it("should open a function with  form: functionName: function()", function () {
                    initInlineTest("test1main.js", 2);
    
                    runs(function () {
                        var inlineWidget = EditorManager.getCurrentFullEditor().getInlineWidgets()[0];
    Severity: Major
    Found in src/extensions/default/JavaScriptQuickEdit/unittests.js and 2 other locations - About 4 hrs to fix
    src/extensions/default/JavaScriptQuickEdit/unittests.js on lines 240..250
    src/extensions/default/JavaScriptQuickEdit/unittests.js on lines 252..262

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 119.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

                it("should insert a quoted attribute value before an existing id attribute", function () {
                    // Insert an unquoted attribute between <div and id on line 5.
                    testDocument.replaceRange("dir= ", { line: 5, ch: 6 });
                    testEditor.setCursorPos({ line: 5, ch: 10 }); // Set cursor between = and the space
                    selectHint(HTMLCodeHints.attrHintProvider, "rtl");
    Severity: Major
    Found in src/extensions/default/HTMLCodeHints/unittests.js and 3 other locations - About 4 hrs to fix
    src/extensions/default/HTMLCodeHints/unittests.js on lines 636..644
    src/extensions/default/HTMLCodeHints/unittests.js on lines 656..663
    src/extensions/default/HTMLCodeHints/unittests.js on lines 674..681

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 119.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

                it("should open a function with  form: function functionName()", function () {
                    initInlineTest("test1main.js", 0);
    
                    runs(function () {
                        var inlineWidget = EditorManager.getCurrentFullEditor().getInlineWidgets()[0];
    Severity: Major
    Found in src/extensions/default/JavaScriptQuickEdit/unittests.js and 2 other locations - About 4 hrs to fix
    src/extensions/default/JavaScriptQuickEdit/unittests.js on lines 252..262
    src/extensions/default/JavaScriptQuickEdit/unittests.js on lines 264..274

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 119.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

                it("should insert a quoted attribute value before an existing unquoted attribute value with preceding space character", function () {
                    // Insert an unquoted attribute between <div and id on line 5.
                    testDocument.replaceRange("dir= ltr ", { line: 5, ch: 6 });
                    testEditor.setCursorPos({ line: 5, ch: 10 }); // Set cursor between = and the space
                    selectHint(HTMLCodeHints.attrHintProvider, "rtl");
    Severity: Major
    Found in src/extensions/default/HTMLCodeHints/unittests.js and 3 other locations - About 4 hrs to fix
    src/extensions/default/HTMLCodeHints/unittests.js on lines 636..644
    src/extensions/default/HTMLCodeHints/unittests.js on lines 665..672
    src/extensions/default/HTMLCodeHints/unittests.js on lines 674..681

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 119.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

                it("should open a function with  form: functionName = function()", function () {
                    initInlineTest("test1main.js", 1);
    
                    runs(function () {
                        var inlineWidget = EditorManager.getCurrentFullEditor().getInlineWidgets()[0];
    Severity: Major
    Found in src/extensions/default/JavaScriptQuickEdit/unittests.js and 2 other locations - About 4 hrs to fix
    src/extensions/default/JavaScriptQuickEdit/unittests.js on lines 240..250
    src/extensions/default/JavaScriptQuickEdit/unittests.js on lines 264..274

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 119.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

                it("should insert a quoted attribute value right before the closing > of the tag", function () {
                    // Insert an unquoted attribute between <p and > on line 7.
                    testDocument.replaceRange(" dir=", { line: 7, ch: 4 });
                    testEditor.setCursorPos({ line: 7, ch: 9 }); // Set cursor between = and >
                    selectHint(HTMLCodeHints.attrHintProvider, "rtl");
    Severity: Major
    Found in src/extensions/default/HTMLCodeHints/unittests.js and 3 other locations - About 4 hrs to fix
    src/extensions/default/HTMLCodeHints/unittests.js on lines 636..644
    src/extensions/default/HTMLCodeHints/unittests.js on lines 656..663
    src/extensions/default/HTMLCodeHints/unittests.js on lines 665..672

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 119.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

                it("should replace the unquoted attribute value with the selected attribute value in quotes", function () {
                    // Insert an unquoted attribute between <div and id on line 5.
                    testDocument.replaceRange("dir=ltr ", { line: 5, ch: 6 });
                    testEditor.setCursorPos({ line: 5, ch: 10 });
                    // Select "rtl" to replace "ltr"
    Severity: Major
    Found in src/extensions/default/HTMLCodeHints/unittests.js and 3 other locations - About 4 hrs to fix
    src/extensions/default/HTMLCodeHints/unittests.js on lines 656..663
    src/extensions/default/HTMLCodeHints/unittests.js on lines 665..672
    src/extensions/default/HTMLCodeHints/unittests.js on lines 674..681

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 119.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

                                .fail(function (err) {
                                    PerfUtils.finalizeMeasurement(perfTimerProvider);
                                    var errError = {
                                        pos: {line: -1, col: 0},
                                        message: StringUtils.format(Strings.LINTER_FAILED, provider.name, err),
    Severity: Major
    Found in src/language/CodeInspection.js and 1 other location - About 4 hrs to fix
    src/language/CodeInspection.js on lines 274..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 119.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

                            } catch (err) {
                                PerfUtils.finalizeMeasurement(perfTimerProvider);
                                var errError = {
                                    pos: {line: -1, col: 0},
                                    message: StringUtils.format(Strings.LINTER_FAILED, provider.name, err),
    Severity: Major
    Found in src/language/CodeInspection.js and 1 other location - About 4 hrs to fix
    src/language/CodeInspection.js on lines 259..268

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 119.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    File RefactoringUtils.js has 341 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*
    * Copyright (c) 2013 - present Adobe Systems Incorporated. All rights reserved.
    *
    * Permission is hereby granted, free of charge, to any person obtaining a
    * copy of this software and associated documentation files (the "Software"),
    Severity: Minor
    Found in src/extensions/default/JavaScriptRefactoring/RefactoringUtils.js - About 4 hrs to fix

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

                  it("should insert the selected attribute value inside the existing quotes", function () {
                      testDocument.replaceRange("dir=\"\"", { line: 9, ch: 7 });  // insert dir="" after <div tag
                      testEditor.setCursorPos({ line: 9, ch: 12 });
                      selectHint(HTMLCodeHints.attrHintProvider, "rtl");
                      expect(testDocument.getLine(9)).toBe("  <div dir=\"rtl\"");
      Severity: Major
      Found in src/extensions/default/HTMLCodeHints/unittests.js and 5 other locations - About 4 hrs to fix
      src/extensions/default/HTMLCodeHints/unittests.js on lines 562..568
      src/extensions/default/HTMLCodeHints/unittests.js on lines 570..576
      src/extensions/default/HTMLCodeHints/unittests.js on lines 586..592
      src/extensions/default/HTMLCodeHints/unittests.js on lines 594..600
      src/extensions/default/HTMLCodeHints/unittests.js on lines 602..608

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

      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

                  it("should insert the selected attribute value wrapped in double quotes", function () {
                      testDocument.replaceRange("dir=", { line: 9, ch: 7 });  // insert dir= after <div tag
                      testEditor.setCursorPos({ line: 9, ch: 11 });
                      selectHint(HTMLCodeHints.attrHintProvider, "rtl");
                      expect(testDocument.getLine(9)).toBe("  <div dir=\"rtl\"");
      Severity: Major
      Found in src/extensions/default/HTMLCodeHints/unittests.js and 5 other locations - About 4 hrs to fix
      src/extensions/default/HTMLCodeHints/unittests.js on lines 562..568
      src/extensions/default/HTMLCodeHints/unittests.js on lines 570..576
      src/extensions/default/HTMLCodeHints/unittests.js on lines 578..584
      src/extensions/default/HTMLCodeHints/unittests.js on lines 594..600
      src/extensions/default/HTMLCodeHints/unittests.js on lines 602..608

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

      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

                  it("should replace the partially typed attribute value with the selected attribute value", function () {
                      testDocument.replaceRange("dir=lt", { line: 9, ch: 7 });  // insert dir="lt after <div tag
                      testEditor.setCursorPos({ line: 9, ch: 13 });
                      selectHint(HTMLCodeHints.attrHintProvider, "ltr");
                      expect(testDocument.getLine(9)).toBe("  <div dir=ltr");
      Severity: Major
      Found in src/extensions/default/HTMLCodeHints/unittests.js and 5 other locations - About 4 hrs to fix
      src/extensions/default/HTMLCodeHints/unittests.js on lines 562..568
      src/extensions/default/HTMLCodeHints/unittests.js on lines 570..576
      src/extensions/default/HTMLCodeHints/unittests.js on lines 578..584
      src/extensions/default/HTMLCodeHints/unittests.js on lines 586..592
      src/extensions/default/HTMLCodeHints/unittests.js on lines 594..600

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

      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

                  it("should replace the partially typed attribute value with the selected attribute value", function () {
                      testDocument.replaceRange("dir=\"lt", { line: 9, ch: 7 });  // insert dir="lt after <div tag
                      testEditor.setCursorPos({ line: 9, ch: 14 });
                      selectHint(HTMLCodeHints.attrHintProvider, "ltr");
                      expect(testDocument.getLine(9)).toBe("  <div dir=\"ltr\"");
      Severity: Major
      Found in src/extensions/default/HTMLCodeHints/unittests.js and 5 other locations - About 4 hrs to fix
      src/extensions/default/HTMLCodeHints/unittests.js on lines 562..568
      src/extensions/default/HTMLCodeHints/unittests.js on lines 570..576
      src/extensions/default/HTMLCodeHints/unittests.js on lines 578..584
      src/extensions/default/HTMLCodeHints/unittests.js on lines 586..592
      src/extensions/default/HTMLCodeHints/unittests.js on lines 602..608

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

      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

                  it("should insert the selected attribute value with the closing (double) quote", function () {
                      testDocument.replaceRange("dir=\"", { line: 9, ch: 7 });  // insert dir=" after <div tag
                      testEditor.setCursorPos({ line: 9, ch: 12 });
                      selectHint(HTMLCodeHints.attrHintProvider, "rtl");
                      expect(testDocument.getLine(9)).toBe("  <div dir=\"rtl\"");
      Severity: Major
      Found in src/extensions/default/HTMLCodeHints/unittests.js and 5 other locations - About 4 hrs to fix
      src/extensions/default/HTMLCodeHints/unittests.js on lines 562..568
      src/extensions/default/HTMLCodeHints/unittests.js on lines 578..584
      src/extensions/default/HTMLCodeHints/unittests.js on lines 586..592
      src/extensions/default/HTMLCodeHints/unittests.js on lines 594..600
      src/extensions/default/HTMLCodeHints/unittests.js on lines 602..608

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

      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

                  it("should insert the selected attribute value with the closing (single) quote", function () {
                      testDocument.replaceRange("dir='", { line: 9, ch: 7 });  // insert dir=' after <div tag
                      testEditor.setCursorPos({ line: 9, ch: 12 });
                      selectHint(HTMLCodeHints.attrHintProvider, "rtl");
                      expect(testDocument.getLine(9)).toBe("  <div dir='rtl'");
      Severity: Major
      Found in src/extensions/default/HTMLCodeHints/unittests.js and 5 other locations - About 4 hrs to fix
      src/extensions/default/HTMLCodeHints/unittests.js on lines 570..576
      src/extensions/default/HTMLCodeHints/unittests.js on lines 578..584
      src/extensions/default/HTMLCodeHints/unittests.js on lines 586..592
      src/extensions/default/HTMLCodeHints/unittests.js on lines 594..600
      src/extensions/default/HTMLCodeHints/unittests.js on lines 602..608

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

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

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

              if ( !this._keySliding && !this._mouseSliding ) {
                  var uiHash = {
                      handle: this.handles[ index ],
                      value: this.value()
                  };
      src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/jquery.ui.slider.js on lines 396..407

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

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Severity
      Category
      Status
      Source
      Language