adobe/brackets

View on GitHub

Showing 3,294 of 3,294 total issues

Function componentDidUpdate has 32 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        componentDidUpdate: function () {
            if (!this.props.visible) {
                return;
            }

Severity: Minor
Found in src/project/FileTreeView.js - About 1 hr to fix

    Function findBlocks has 32 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function findBlocks(editor, modeName) {
            // Start scanning from beginning of file
            var ctx = TokenUtils.getInitialContext(editor._codeMirror, {line: 0, ch: 0}),
                blocks = [],
                currentBlock = null,
    Severity: Minor
    Found in src/language/HTMLUtils.js - About 1 hr to fix

      Function style has 32 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          style: function( elem, name, value, extra ) {
      
              // Don't set styles on text and comment nodes
              if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
                  return;
      Severity: Minor
      Found in src/thirdparty/jquery-2.1.3.js - About 1 hr to fix

        Function getTagInfo has 32 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function getTagInfo(editor, pos) {
                var ctx, offset, tagAttrs, tagAttrValue;
        
                ctx = TokenUtils.getInitialContext(editor._codeMirror, pos);
                offset = TokenUtils.offsetInToken(ctx);
        Severity: Minor
        Found in src/language/XMLUtils.js - About 1 hr to fix

          Function addClass has 32 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              addClass: function( value ) {
                  var classes, elem, cur, clazz, j, finalValue,
                      proceed = typeof value === "string" && value,
                      i = 0,
                      len = this.length;
          Severity: Minor
          Found in src/thirdparty/jquery-2.1.3.js - About 1 hr to fix

            Function removeClass has 32 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                removeClass: function( value ) {
                    var classes, elem, cur, clazz, j, finalValue,
                        proceed = arguments.length === 0 || typeof value === "string" && value,
                        i = 0,
                        len = this.length;
            Severity: Minor
            Found in src/thirdparty/jquery-2.1.3.js - About 1 hr to fix

              Function load has 32 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              jQuery.fn.load = function( url, params, callback ) {
                  if ( typeof url !== "string" && _load ) {
                      return _load.apply( this, arguments );
                  }
              
              
              Severity: Minor
              Found in src/thirdparty/jquery-2.1.3.js - About 1 hr to fix

                Function popUpHint has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    function popUpHint(editor, explicit, onCursorActivity) {
                        var request = null;
                        var $deferredPopUp = $.Deferred();
                        var sessionProvider = null;
                
                
                Severity: Minor
                Found in src/features/ParameterHintsManager.js - About 1 hr to fix

                  Function createFilterPicker has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      function createFilterPicker(context) {
                  
                          function itemRenderer(item, index) {
                              if (index < FIRST_FILTER_INDEX) {
                                  // Prefix the two filter commands with 'recent-filter-name' so that
                  Severity: Minor
                  Found in src/search/FileFilters.js - About 1 hr to fix

                    Function _doOpenWithOptionalPath has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        function _doOpenWithOptionalPath(fullPath, silent, paneId, options) {
                            var result;
                            paneId = paneId || MainViewManager.ACTIVE_PANE;
                            if (!fullPath) {
                                // Create placeholder deferred
                    Severity: Minor
                    Found in src/document/DocumentCommandHandlers.js - About 1 hr to fix

                      Function parsePersonString has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                      Open

                      function parsePersonString(obj) {
                          if (typeof (obj) === "string") {
                              var parts = _personRegex.exec(obj);
                      
                              // No regex match, so we just synthesize an object with an opaque name string
                      Severity: Minor
                      Found in src/extensibility/node/package-validator.js - About 1 hr to fix

                      Cognitive Complexity

                      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                      A method's cognitive complexity is based on a few simple rules:

                      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                      • Code is considered more complex for each "break in the linear flow of the code"
                      • Code is considered more complex when "flow breaking structures are nested"

                      Further reading

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

                                  it("should hint after =", function () {
                                      // After baseline-shift= in second rect.
                                      testEditor.setCursorPos({line: 5, ch: 64});
                                      var hintList = expectHints(SVGCodeHints.hintProvider);
                                      verifyHints(hintList, "baseline");
                      Severity: Major
                      Found in src/extensions/default/SVGCodeHints/unittests.js and 14 other locations - About 1 hr to fix
                      src/extensions/default/SVGCodeHints/unittests.js on lines 126..131
                      src/extensions/default/SVGCodeHints/unittests.js on lines 133..138
                      src/extensions/default/SVGCodeHints/unittests.js on lines 140..145
                      src/extensions/default/SVGCodeHints/unittests.js on lines 270..275
                      src/extensions/default/SVGCodeHints/unittests.js on lines 277..282
                      src/extensions/default/SVGCodeHints/unittests.js on lines 284..289
                      src/extensions/default/SVGCodeHints/unittests.js on lines 291..296
                      src/extensions/default/SVGCodeHints/unittests.js on lines 364..369
                      src/extensions/default/SVGCodeHints/unittests.js on lines 371..376
                      src/extensions/default/SVGCodeHints/unittests.js on lines 378..383
                      src/extensions/default/SVGCodeHints/unittests.js on lines 385..390
                      src/extensions/default/SVGCodeHints/unittests.js on lines 392..397
                      src/extensions/default/SVGCodeHints/unittests.js on lines 399..404
                      src/extensions/default/SVGCodeHints/unittests.js on lines 406..411

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

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

                                  it("should hint at the end of the tag", function () {
                                      // After <svg in <svg
                                      testEditor.setCursorPos({line: 1, ch: 4});
                                      var hintList = expectHints(SVGCodeHints.hintProvider);
                                      verifyHints(hintList, "svg");
                      Severity: Major
                      Found in src/extensions/default/SVGCodeHints/unittests.js and 14 other locations - About 1 hr to fix
                      src/extensions/default/SVGCodeHints/unittests.js on lines 126..131
                      src/extensions/default/SVGCodeHints/unittests.js on lines 133..138
                      src/extensions/default/SVGCodeHints/unittests.js on lines 270..275
                      src/extensions/default/SVGCodeHints/unittests.js on lines 277..282
                      src/extensions/default/SVGCodeHints/unittests.js on lines 284..289
                      src/extensions/default/SVGCodeHints/unittests.js on lines 291..296
                      src/extensions/default/SVGCodeHints/unittests.js on lines 357..362
                      src/extensions/default/SVGCodeHints/unittests.js on lines 364..369
                      src/extensions/default/SVGCodeHints/unittests.js on lines 371..376
                      src/extensions/default/SVGCodeHints/unittests.js on lines 378..383
                      src/extensions/default/SVGCodeHints/unittests.js on lines 385..390
                      src/extensions/default/SVGCodeHints/unittests.js on lines 392..397
                      src/extensions/default/SVGCodeHints/unittests.js on lines 399..404
                      src/extensions/default/SVGCodeHints/unittests.js on lines 406..411

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

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

                                  it("should hint after first space after tag", function () {
                                      // After <rect
                                      testEditor.setCursorPos({line: 4, ch: 10});
                                      var hintList = expectHints(SVGCodeHints.hintProvider);
                                      verifyHints(hintList, "class");
                      Severity: Major
                      Found in src/extensions/default/SVGCodeHints/unittests.js and 14 other locations - About 1 hr to fix
                      src/extensions/default/SVGCodeHints/unittests.js on lines 126..131
                      src/extensions/default/SVGCodeHints/unittests.js on lines 133..138
                      src/extensions/default/SVGCodeHints/unittests.js on lines 140..145
                      src/extensions/default/SVGCodeHints/unittests.js on lines 277..282
                      src/extensions/default/SVGCodeHints/unittests.js on lines 284..289
                      src/extensions/default/SVGCodeHints/unittests.js on lines 291..296
                      src/extensions/default/SVGCodeHints/unittests.js on lines 357..362
                      src/extensions/default/SVGCodeHints/unittests.js on lines 364..369
                      src/extensions/default/SVGCodeHints/unittests.js on lines 371..376
                      src/extensions/default/SVGCodeHints/unittests.js on lines 378..383
                      src/extensions/default/SVGCodeHints/unittests.js on lines 385..390
                      src/extensions/default/SVGCodeHints/unittests.js on lines 392..397
                      src/extensions/default/SVGCodeHints/unittests.js on lines 399..404
                      src/extensions/default/SVGCodeHints/unittests.js on lines 406..411

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

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

                                  it("should hint at < before tag name", function () {
                                      // After < in <svg
                                      testEditor.setCursorPos({line: 1, ch: 1});
                                      var hintList = expectHints(SVGCodeHints.hintProvider);
                                      verifyHints(hintList, "a");
                      Severity: Major
                      Found in src/extensions/default/SVGCodeHints/unittests.js and 14 other locations - About 1 hr to fix
                      src/extensions/default/SVGCodeHints/unittests.js on lines 133..138
                      src/extensions/default/SVGCodeHints/unittests.js on lines 140..145
                      src/extensions/default/SVGCodeHints/unittests.js on lines 270..275
                      src/extensions/default/SVGCodeHints/unittests.js on lines 277..282
                      src/extensions/default/SVGCodeHints/unittests.js on lines 284..289
                      src/extensions/default/SVGCodeHints/unittests.js on lines 291..296
                      src/extensions/default/SVGCodeHints/unittests.js on lines 357..362
                      src/extensions/default/SVGCodeHints/unittests.js on lines 364..369
                      src/extensions/default/SVGCodeHints/unittests.js on lines 371..376
                      src/extensions/default/SVGCodeHints/unittests.js on lines 378..383
                      src/extensions/default/SVGCodeHints/unittests.js on lines 385..390
                      src/extensions/default/SVGCodeHints/unittests.js on lines 392..397
                      src/extensions/default/SVGCodeHints/unittests.js on lines 399..404
                      src/extensions/default/SVGCodeHints/unittests.js on lines 406..411

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

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

                                  it("should hint after =\"", function () {
                                      // After baseline-shift="
                                      testEditor.setCursorPos({line: 4, ch: 51});
                                      var hintList = expectHints(SVGCodeHints.hintProvider);
                                      verifyHints(hintList, "baseline");
                      Severity: Major
                      Found in src/extensions/default/SVGCodeHints/unittests.js and 14 other locations - About 1 hr to fix
                      src/extensions/default/SVGCodeHints/unittests.js on lines 126..131
                      src/extensions/default/SVGCodeHints/unittests.js on lines 133..138
                      src/extensions/default/SVGCodeHints/unittests.js on lines 140..145
                      src/extensions/default/SVGCodeHints/unittests.js on lines 270..275
                      src/extensions/default/SVGCodeHints/unittests.js on lines 277..282
                      src/extensions/default/SVGCodeHints/unittests.js on lines 284..289
                      src/extensions/default/SVGCodeHints/unittests.js on lines 291..296
                      src/extensions/default/SVGCodeHints/unittests.js on lines 357..362
                      src/extensions/default/SVGCodeHints/unittests.js on lines 364..369
                      src/extensions/default/SVGCodeHints/unittests.js on lines 378..383
                      src/extensions/default/SVGCodeHints/unittests.js on lines 385..390
                      src/extensions/default/SVGCodeHints/unittests.js on lines 392..397
                      src/extensions/default/SVGCodeHints/unittests.js on lines 399..404
                      src/extensions/default/SVGCodeHints/unittests.js on lines 406..411

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

                      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 list all prop-name hints in new line", function () {
                                      testEditor.setCursorPos({ line: 5, ch: 1 });
                      
                                      var hintList = expectHints(CSSCodeHints.cssPropHintProvider);
                                      verifyAttrHints(hintList, "align-content");  // filtered on "empty string"
                      Severity: Major
                      Found in src/extensions/default/CSSCodeHints/unittests.js and 5 other locations - About 1 hr to fix
                      src/extensions/default/CSSCodeHints/unittests.js on lines 180..185
                      src/extensions/default/CSSCodeHints/unittests.js on lines 477..482
                      src/extensions/default/CSSCodeHints/unittests.js on lines 484..489
                      src/extensions/default/HTMLCodeHints/unittests.js on lines 169..173
                      src/extensions/default/HTMLCodeHints/unittests.js on lines 174..178

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

                      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 list hints within existing attribute", function () {
                                      testEditor.setCursorPos({ line: 5, ch: 7 });
                                      var hintList = expectHints(HTMLCodeHints.attrHintProvider);
                                      verifyAttrHints(hintList, "id");  // filtered on "i"
                                  });
                      Severity: Major
                      Found in src/extensions/default/HTMLCodeHints/unittests.js and 5 other locations - About 1 hr to fix
                      src/extensions/default/CSSCodeHints/unittests.js on lines 173..178
                      src/extensions/default/CSSCodeHints/unittests.js on lines 180..185
                      src/extensions/default/CSSCodeHints/unittests.js on lines 477..482
                      src/extensions/default/CSSCodeHints/unittests.js on lines 484..489
                      src/extensions/default/HTMLCodeHints/unittests.js on lines 174..178

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

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

                                  it("should hint at the end of the value", function () {
                                      // After baseline-shift="baseline
                                      testEditor.setCursorPos({line: 4, ch: 59});
                                      var hintList = expectHints(SVGCodeHints.hintProvider);
                                      verifyHints(hintList, "baseline");
                      Severity: Major
                      Found in src/extensions/default/SVGCodeHints/unittests.js and 14 other locations - About 1 hr to fix
                      src/extensions/default/SVGCodeHints/unittests.js on lines 126..131
                      src/extensions/default/SVGCodeHints/unittests.js on lines 133..138
                      src/extensions/default/SVGCodeHints/unittests.js on lines 140..145
                      src/extensions/default/SVGCodeHints/unittests.js on lines 270..275
                      src/extensions/default/SVGCodeHints/unittests.js on lines 277..282
                      src/extensions/default/SVGCodeHints/unittests.js on lines 284..289
                      src/extensions/default/SVGCodeHints/unittests.js on lines 291..296
                      src/extensions/default/SVGCodeHints/unittests.js on lines 357..362
                      src/extensions/default/SVGCodeHints/unittests.js on lines 364..369
                      src/extensions/default/SVGCodeHints/unittests.js on lines 371..376
                      src/extensions/default/SVGCodeHints/unittests.js on lines 378..383
                      src/extensions/default/SVGCodeHints/unittests.js on lines 385..390
                      src/extensions/default/SVGCodeHints/unittests.js on lines 399..404
                      src/extensions/default/SVGCodeHints/unittests.js on lines 406..411

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

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

                                  it("should hint for first attribute in multiple options", function () {
                                      // After preserveAspectRatio="x
                                      testEditor.setCursorPos({line: 2, ch: 52});
                                      var hintList = expectHints(SVGCodeHints.hintProvider);
                                      verifyHints(hintList, "xMaxYMax");
                      Severity: Major
                      Found in src/extensions/default/SVGCodeHints/unittests.js and 14 other locations - About 1 hr to fix
                      src/extensions/default/SVGCodeHints/unittests.js on lines 126..131
                      src/extensions/default/SVGCodeHints/unittests.js on lines 133..138
                      src/extensions/default/SVGCodeHints/unittests.js on lines 140..145
                      src/extensions/default/SVGCodeHints/unittests.js on lines 270..275
                      src/extensions/default/SVGCodeHints/unittests.js on lines 277..282
                      src/extensions/default/SVGCodeHints/unittests.js on lines 284..289
                      src/extensions/default/SVGCodeHints/unittests.js on lines 291..296
                      src/extensions/default/SVGCodeHints/unittests.js on lines 357..362
                      src/extensions/default/SVGCodeHints/unittests.js on lines 364..369
                      src/extensions/default/SVGCodeHints/unittests.js on lines 371..376
                      src/extensions/default/SVGCodeHints/unittests.js on lines 378..383
                      src/extensions/default/SVGCodeHints/unittests.js on lines 385..390
                      src/extensions/default/SVGCodeHints/unittests.js on lines 392..397
                      src/extensions/default/SVGCodeHints/unittests.js on lines 406..411

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

                      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