adobe/brackets

View on GitHub

Showing 3,294 of 3,294 total issues

Consider simplifying this complex logical expression.
Open

        if ($.datepicker._datepickerShowing)
            switch (event.keyCode) {
                case 9: $.datepicker._hideDatepicker();
                        handled = false;
                        break; // hide on tab out

    Consider simplifying this complex logical expression.
    Open

            if(       this.options.tolerance == "pointer"
                || this.options.forcePointerForContainers
                || (this.options.tolerance != "pointer" && this.helperProportions[this.floating ? 'width' : 'height'] > item[this.floating ? 'width' : 'height'])
            ) {
                return isOverElement;

      Consider simplifying this complex logical expression.
      Open

                  if (!left.identifier && left.id !== '.' && left.id !== '[' &&
                          left.id !== '(' && left.id !== '&&' && left.id !== '||' &&
                          left.id !== '?') {
                      warning("Bad invocation.", left);
                  }

        Consider simplifying this complex logical expression.
        Open

                        if ( run_all || (!event.namespace && !handleObj.namespace) || event.namespace_re && event.namespace_re.test( handleObj.namespace ) ) {
        
                            event.data = handleObj.data;
                            event.handleObj = handleObj;
        
        

          Consider simplifying this complex logical expression.
          Open

                      if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
                          ( jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value ) ) &&
                          !wrapMap[ ( rtagName.exec( value ) || ["", ""] )[1].toLowerCase() ] ) {
          
                          value = value.replace( rxhtmlTag, "<$1></$2>" );

            Consider simplifying this complex logical expression.
            Open

            if ( jQuery.expr && jQuery.expr.filters ) {
                jQuery.expr.filters.hidden = function( elem ) {
                    var width = elem.offsetWidth,
                        height = elem.offsetHeight;
            
            

              Consider simplifying this complex logical expression.
              Open

                      if ( (!id || !cache[id] || (!isEvents && !pvt && !cache[id].data)) && getByName && data === undefined ) {
                          return;
                      }

                Function extract has 8 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    function extract(ast, text, scopes, srcScope, destScope, start, end, isExpression) {
                Severity: Major
                Found in src/extensions/default/JavaScriptRefactoring/ExtractToFunction.js - About 1 hr to fix

                  Consider simplifying this complex logical expression.
                  Open

                          if (isHDTracking && !isEventDataAlreadySent && eventName && eventCategory) {
                              eventParams =  {
                                  eventName: eventName,
                                  eventCategory: eventCategory,
                                  eventSubCategory: eventSubCategory || "",
                  Severity: Major
                  Found in src/utils/HealthLogger.js - About 1 hr to fix

                    Function createTagInfo has 8 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        function createTagInfo(tokenType, offset, tagName, attrName, attrValue, valueAssigned, quoteChar, hasEndQuote) {
                    Severity: Major
                    Found in src/language/HTMLUtils.js - About 1 hr to fix

                      Consider simplifying this complex logical expression.
                      Open

                              if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
                                      support.getById && context.nodeType === 9 && documentIsHTML &&
                                      Expr.relative[ tokens[1].type ] ) {
                      
                                  context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];
                      Severity: Major
                      Found in src/thirdparty/jquery-2.1.3.js - About 1 hr to fix

                        Function updateNode has 8 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                          function updateNode(node, ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {
                        Severity: Major
                        Found in src/thirdparty/immutable.js - About 1 hr to fix

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

                                      beforeEach(function () {
                                          // create Editor instance (containing a CodeMirror instance)
                                          var mock = SpecRunnerUtils.createMockEditor(defaultContent, selectMode());
                                          testEditor = mock.editor;
                                          testDocument = mock.doc;
                          Severity: Major
                          Found in src/extensions/default/CSSAtRuleCodeHints/unittests.js and 2 other locations - About 1 hr to fix
                          src/extensions/default/CSSPseudoSelectorHints/unittests.js on lines 130..135
                          src/extensions/default/CSSPseudoSelectorHints/unittests.js on lines 176..181

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

                          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 clip max saturation on right arrow", function () {
                                              testKey({
                                                  color:     "hsla(50, 100%, 50%, 0.5)",
                                                  item:      "$selectionBase",
                                                  key:       KeyEvent.DOM_VK_RIGHT,
                          Severity: Major
                          Found in src/extensions/default/InlineColorEditor/unittests.js and 5 other locations - About 1 hr to fix
                          src/extensions/default/InlineColorEditor/unittests.js on lines 917..926
                          src/extensions/default/InlineColorEditor/unittests.js on lines 957..966
                          src/extensions/default/InlineColorEditor/unittests.js on lines 997..1006
                          src/extensions/default/InlineColorEditor/unittests.js on lines 1117..1126
                          src/extensions/default/InlineColorEditor/unittests.js on lines 1157..1166

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

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

                              var options, name, src, copy, copyIsArray, clone,
                                  target = arguments[0] || {},
                                  i = 1,
                                  length = arguments.length,
                                  deep = false;
                          src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/external/globalize.js on lines 299..303
                          src/thirdparty/jquery-2.1.3.js on lines 178..182

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

                          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 clip min saturation on left arrow", function () {
                                              testKey({
                                                  color:     "hsla(50, 0%, 50%, 0.5)",
                                                  item:      "$selectionBase",
                                                  key:       KeyEvent.DOM_VK_LEFT,
                          Severity: Major
                          Found in src/extensions/default/InlineColorEditor/unittests.js and 5 other locations - About 1 hr to fix
                          src/extensions/default/InlineColorEditor/unittests.js on lines 877..886
                          src/extensions/default/InlineColorEditor/unittests.js on lines 957..966
                          src/extensions/default/InlineColorEditor/unittests.js on lines 997..1006
                          src/extensions/default/InlineColorEditor/unittests.js on lines 1117..1126
                          src/extensions/default/InlineColorEditor/unittests.js on lines 1157..1166

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

                          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 clip max value on up arrow", function () {
                                              testKey({
                                                  color:     "hsla(50, 25%, 100%, 0.5)",
                                                  item:      "$selectionBase",
                                                  key:       KeyEvent.DOM_VK_UP,
                          Severity: Major
                          Found in src/extensions/default/InlineColorEditor/unittests.js and 5 other locations - About 1 hr to fix
                          src/extensions/default/InlineColorEditor/unittests.js on lines 877..886
                          src/extensions/default/InlineColorEditor/unittests.js on lines 917..926
                          src/extensions/default/InlineColorEditor/unittests.js on lines 997..1006
                          src/extensions/default/InlineColorEditor/unittests.js on lines 1117..1126
                          src/extensions/default/InlineColorEditor/unittests.js on lines 1157..1166

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

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

                              var options, name, src, copy, copyIsArray, clone,
                                  target = arguments[0] || {},
                                  i = 1,
                                  length = arguments.length,
                                  deep = false;
                          src/thirdparty/jquery-2.1.3.js on lines 178..182
                          src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/jquery-1.7.2.js on lines 325..329

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

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

                                      beforeEach(function () {
                                          // create Editor instance (containing a CodeMirror instance)
                                          var mock = SpecRunnerUtils.createMockEditor(defaultContent, selectMode());
                                          testEditor = mock.editor;
                                          testDocument = mock.doc;
                          Severity: Major
                          Found in src/extensions/default/CSSPseudoSelectorHints/unittests.js and 2 other locations - About 1 hr to fix
                          src/extensions/default/CSSAtRuleCodeHints/unittests.js on lines 126..131
                          src/extensions/default/CSSPseudoSelectorHints/unittests.js on lines 130..135

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

                          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 clip max opacity on up arrow", function () {
                                              testKey({
                                                  color:     "hsla(90, 25%, 50%, 1.0)",
                                                  item:      "$opacitySelector",
                                                  key:       KeyEvent.DOM_VK_UP,
                          Severity: Major
                          Found in src/extensions/default/InlineColorEditor/unittests.js and 5 other locations - About 1 hr to fix
                          src/extensions/default/InlineColorEditor/unittests.js on lines 877..886
                          src/extensions/default/InlineColorEditor/unittests.js on lines 917..926
                          src/extensions/default/InlineColorEditor/unittests.js on lines 957..966
                          src/extensions/default/InlineColorEditor/unittests.js on lines 997..1006
                          src/extensions/default/InlineColorEditor/unittests.js on lines 1157..1166

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

                          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