adobe/brackets

View on GitHub

Showing 3,294 of 3,294 total issues

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

        function makeTimingFunctionEditor(cursor) {
            runs(function () {
                var promise = provider(testEditor, cursor);
                if (promise) {
                    promise.done(function (inlineResult) {
src/extensions/default/InlineColorEditor/unittests.js on lines 73..84

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

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

Function validatePackageJSON has 63 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function validatePackageJSON(path, packageJSON, options, callback) {
    var errors = [];
    if (fs.existsSync(packageJSON)) {
        fs.readFile(packageJSON, {
            encoding: "utf8"
Severity: Major
Found in src/extensibility/node/package-validator.js - About 2 hrs to fix

    Function doMultipleEdits has 63 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        Document.prototype.doMultipleEdits = function (edits, origin) {
            var self = this;
    
            // Sort the edits backwards, so we don't have to adjust the edit positions as we go along
            // (though we do have to adjust the selection positions).
    Severity: Major
    Found in src/document/Document.js - About 2 hrs to fix

      Function _closeList has 63 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function _closeList(list, promptOnly, _forceClose) {
              var result      = new $.Deferred(),
                  unsavedDocs = [];
      
              list.forEach(function (file) {
      Severity: Major
      Found in src/document/DocumentCommandHandlers.js - About 2 hrs to fix

        Function _finishReplaceBatch has 63 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function _finishReplaceBatch(model) {
                var replaceText = model.replaceText;
                if (replaceText === null) {
                    return;
                }
        Severity: Major
        Found in src/search/FindInFilesUI.js - About 2 hrs to fix

          Function _doSaveAfterSaveDialog has 63 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  function _doSaveAfterSaveDialog(path) {
                      var newFile;
          
                      // Reconstruct old doc's editor's view state, & finally resolve overall promise
                      function _configureEditorAndResolve() {
          Severity: Major
          Found in src/document/DocumentCommandHandlers.js - About 2 hrs to fix

            File main.js has 271 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/CSSCodeHints/main.js - About 2 hrs to fix

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

                          it("should match ease-out function in declaration in strict mode", function () {
                              match = TimingFunctionUtils.timingFunctionMatch("transition-timing-function: ease-out;", false);
                              expect(match.length).toEqual(1);
                              expect(match[0]).toEqual("ease-out");
                              expect(match.originalString).toBeFalsy();
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 143..148
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 149..154
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 155..160
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 161..166
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 168..173
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 174..179
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 180..185
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 186..191
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 192..197
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 198..203
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 210..215
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 216..221
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 354..359
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 360..365

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

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

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

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

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

              Refactorings

              Further Reading

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

                          it("should list all prop-values for 'display' after colon", function () {
                              // insert semicolon after previous rule to avoid incorrect tokenizing
                              testDocument.replaceRange(";", { line: 12, ch: 5 });
              
                              testEditor.setCursorPos({ line: 13, ch: 9 });
              Severity: Major
              Found in src/extensions/default/CSSCodeHints/unittests.js and 6 other locations - About 2 hrs to fix
              src/extensions/default/CSSCodeHints/unittests.js on lines 187..194
              src/extensions/default/CSSCodeHints/unittests.js on lines 196..203
              src/extensions/default/CSSCodeHints/unittests.js on lines 349..356
              src/extensions/default/CSSCodeHints/unittests.js on lines 358..365
              src/extensions/default/CSSCodeHints/unittests.js on lines 491..498
              src/extensions/default/CSSCodeHints/unittests.js on lines 500..507

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

              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 match ease-in function in declaration in strict mode", function () {
                              match = TimingFunctionUtils.timingFunctionMatch("transition-timing-function: ease-in;", false);
                              expect(match.length).toEqual(1);
                              expect(match[0]).toEqual("ease-in");
                              expect(match.originalString).toBeFalsy();
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 143..148
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 149..154
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 155..160
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 161..166
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 168..173
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 174..179
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 180..185
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 186..191
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 198..203
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 204..209
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 210..215
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 216..221
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 354..359
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 360..365

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

              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 match linear function in declaration in strict mode", function () {
                              match = TimingFunctionUtils.timingFunctionMatch("transition-timing-function: linear;", false);
                              expect(match.length).toEqual(1);
                              expect(match[0]).toEqual("linear");
                              expect(match.originalString).toBeFalsy();
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 143..148
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 149..154
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 155..160
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 161..166
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 174..179
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 180..185
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 186..191
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 192..197
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 198..203
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 204..209
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 210..215
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 216..221
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 354..359
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 360..365

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

              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 match linear function value in lax mode", function () {
                              match = TimingFunctionUtils.timingFunctionMatch("linear", true);
                              expect(match.length).toEqual(1);
                              expect(match[0]).toEqual("linear");
                              expect(match.originalString).toBeFalsy();
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 143..148
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 149..154
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 155..160
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 161..166
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 168..173
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 180..185
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 186..191
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 192..197
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 198..203
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 204..209
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 210..215
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 216..221
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 354..359
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 360..365

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

              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 match ease-out function value in lax mode", function () {
                              match = TimingFunctionUtils.timingFunctionMatch("ease-out", true);
                              expect(match.length).toEqual(1);
                              expect(match[0]).toEqual("ease-out");
                              expect(match.originalString).toBeFalsy();
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 143..148
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 149..154
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 155..160
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 161..166
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 168..173
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 174..179
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 180..185
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 186..191
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 192..197
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 198..203
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 204..209
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 216..221
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 354..359
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 360..365

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

              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 match ease-in-out function in declaration in strict mode", function () {
                              match = TimingFunctionUtils.timingFunctionMatch("transition-timing-function: ease-in-out;", false);
                              expect(match.length).toEqual(1);
                              expect(match[0]).toEqual("ease-in-out");
                              expect(match.originalString).toBeFalsy();
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 143..148
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 149..154
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 155..160
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 161..166
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 168..173
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 174..179
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 180..185
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 186..191
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 192..197
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 198..203
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 204..209
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 210..215
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 354..359
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 360..365

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

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

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

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

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

              Refactorings

              Further Reading

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

                          it("should list all prop-name hints starting with 'border-' ", function () {
                              // insert semicolon after previous rule to avoid incorrect tokenizing
                              testDocument.replaceRange(";", { line: 7, ch: 5 });
              
                              testEditor.setCursorPos({ line: 8, ch: 8 });
              Severity: Major
              Found in src/extensions/default/CSSCodeHints/unittests.js and 6 other locations - About 2 hrs to fix
              src/extensions/default/CSSCodeHints/unittests.js on lines 187..194
              src/extensions/default/CSSCodeHints/unittests.js on lines 340..347
              src/extensions/default/CSSCodeHints/unittests.js on lines 349..356
              src/extensions/default/CSSCodeHints/unittests.js on lines 358..365
              src/extensions/default/CSSCodeHints/unittests.js on lines 491..498
              src/extensions/default/CSSCodeHints/unittests.js on lines 500..507

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

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

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

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

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

              Refactorings

              Further Reading

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

                          it("should list all prop-values starting with 'in' for 'display' after colon and whitespace", function () {
                              // insert semicolon after previous rule to avoid incorrect tokenizing
                              testDocument.replaceRange(";", { line: 13, ch: 10 });
              
                              testEditor.setCursorPos({ line: 14, ch: 12 });
              Severity: Major
              Found in src/extensions/default/CSSCodeHints/unittests.js and 6 other locations - About 2 hrs to fix
              src/extensions/default/CSSCodeHints/unittests.js on lines 187..194
              src/extensions/default/CSSCodeHints/unittests.js on lines 196..203
              src/extensions/default/CSSCodeHints/unittests.js on lines 340..347
              src/extensions/default/CSSCodeHints/unittests.js on lines 349..356
              src/extensions/default/CSSCodeHints/unittests.js on lines 491..498
              src/extensions/default/CSSCodeHints/unittests.js on lines 500..507

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

              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

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

                          if (ctx.token.type === "string" && /^['"]$/.test(ctx.token.string.substr(-1, 1)) &&
                                  ctx.token.string.length !== 1 && ctx.token.end === pos.ch) {
                              return null;
                          }
              Severity: Major
              Found in src/language/JSONUtils.js and 1 other location - About 2 hrs to fix
              src/language/XMLUtils.js on lines 257..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 85.

              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 match step-start function value in lax mode", function () {
                              match = TimingFunctionUtils.timingFunctionMatch("step-start", true);
                              expect(match.length).toEqual(1);
                              expect(match[0]).toEqual("step-start");
                              expect(match.originalString).toBeFalsy();
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 143..148
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 149..154
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 155..160
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 161..166
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 168..173
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 174..179
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 180..185
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 186..191
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 192..197
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 198..203
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 204..209
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 210..215
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 216..221
              src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 360..365

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

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

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

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

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

              Refactorings

              Further Reading

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

                          it("should list all prop-name hints starting with 'bord' ", function () {
                              // insert semicolon after previous rule to avoid incorrect tokenizing
                              testDocument.replaceRange(";", { line: 6, ch: 2 });
              
                              testEditor.setCursorPos({ line: 7, ch: 5 });
              Severity: Major
              Found in src/extensions/default/CSSCodeHints/unittests.js and 6 other locations - About 2 hrs to fix
              src/extensions/default/CSSCodeHints/unittests.js on lines 196..203
              src/extensions/default/CSSCodeHints/unittests.js on lines 340..347
              src/extensions/default/CSSCodeHints/unittests.js on lines 349..356
              src/extensions/default/CSSCodeHints/unittests.js on lines 358..365
              src/extensions/default/CSSCodeHints/unittests.js on lines 491..498
              src/extensions/default/CSSCodeHints/unittests.js on lines 500..507

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

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

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

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

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

              Refactorings

              Further Reading

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

                          it("should list all prop-values for 'display' after colon and whitespace", function () {
                              // insert semicolon after previous rule to avoid incorrect tokenizing
                              testDocument.replaceRange(";", { line: 12, ch: 5 });
              
                              testEditor.setCursorPos({ line: 13, ch: 10 });
              Severity: Major
              Found in src/extensions/default/CSSCodeHints/unittests.js and 6 other locations - About 2 hrs to fix
              src/extensions/default/CSSCodeHints/unittests.js on lines 187..194
              src/extensions/default/CSSCodeHints/unittests.js on lines 196..203
              src/extensions/default/CSSCodeHints/unittests.js on lines 340..347
              src/extensions/default/CSSCodeHints/unittests.js on lines 358..365
              src/extensions/default/CSSCodeHints/unittests.js on lines 491..498
              src/extensions/default/CSSCodeHints/unittests.js on lines 500..507

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

              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