adobe/brackets

View on GitHub

Showing 3,294 of 3,294 total issues

Function setDocument has 218 lines of code (exceeds 25 allowed). Consider refactoring.
Open

setDocument = Sizzle.setDocument = function( node ) {
    var hasCompare, parent,
        doc = node ? node.ownerDocument || node : preferredDoc;

    // If no document and documentElement is available, return
Severity: Major
Found in src/thirdparty/jquery-2.1.3.js - About 1 day to fix

    Function DOMAgent has 214 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    define(function DOMAgent(require, exports, module) {
        "use strict";
    
        var Inspector       = require("LiveDevelopment/Inspector/Inspector"),
            EventDispatcher = require("utils/EventDispatcher"),
    Severity: Major
    Found in src/LiveDevelopment/Agents/DOMAgent.js - About 1 day to fix

      File main.js has 520 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: Major
      Found in src/extensions/default/JavaScriptCodeHints/main.js - About 1 day to fix

        File jquery.ui.slider.js has 520 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        /*!
         * jQuery UI Slider @VERSION
         *
         * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
         * Dual licensed under the MIT or GPL Version 2 licenses.

          Function generateChildEdits has 211 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              var generateChildEdits = function (oldParent, oldNodeMap, newParent, newNodeMap) {
                  /*jslint continue: true */
          
                  var newIndex = 0,
                      oldIndex = 0,
          Severity: Major
          Found in src/language/HTMLDOMDiff.js - About 1 day to fix

            Function exports has 209 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            module.exports = function (grunt) {
                var child_process   = require("child_process"),
                    http            = require("http"),
                    https           = require("https"),
                    build           = {},
            Severity: Major
            Found in tasks/build.js - About 1 day to fix

              Function Inspector has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring.
              Open

              define(function Inspector(require, exports, module) {
                  "use strict";
              
                  var Async           = require("utils/Async"),
                      EventDispatcher = require("utils/EventDispatcher");
              Severity: Minor
              Found in src/LiveDevelopment/Inspector/Inspector.js - About 1 day 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 2 locations. Consider refactoring.
              Open

                  function _dumpDOM(root) {
                      var result = "",
                          indent = "";
              
                      function walk(node) {
              src/language/HTMLSimpleDOM.js on lines 552..571

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

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

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

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

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

              Refactorings

              Further Reading

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

                  function _dumpDOM(root) {
                      var result = "",
                          indent = "";
              
                      function walk(node) {
              Severity: Major
              Found in src/language/HTMLSimpleDOM.js and 1 other location - About 1 day to fix
              src/LiveDevelopment/MultiBrowserImpl/language/HTMLSimpleDOM.js on lines 522..541

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

              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 HTMLDocumentModule has 206 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              define(function HTMLDocumentModule(require, exports, module) {
                  "use strict";
              
                  var EditorManager       = require("editor/EditorManager"),
                      EventDispatcher     = require("utils/EventDispatcher"),
              Severity: Major
              Found in src/LiveDevelopment/Documents/HTMLDocument.js - About 1 day to fix

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

                                runs(function () {
                                    expect(hintsObj).toBeTruthy();
                                    expect(hintsObj.hints).toBeTruthy();
                                    expect(hintsObj.hints.length).toBe(subfolderDirHints.length);
                
                
                Severity: Major
                Found in src/extensions/default/UrlCodeHints/unittests.js and 1 other location - About 1 day to fix
                src/extensions/default/UrlCodeHints/unittests.js on lines 561..577

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

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

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

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

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

                Refactorings

                Further Reading

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

                                runs(function () {
                                    expect(hintsObj).toBeTruthy();
                                    expect(hintsObj.hints).toBeTruthy();
                                    expect(hintsObj.hints.length).toBe(subfolderDirHints.length);
                
                
                Severity: Major
                Found in src/extensions/default/UrlCodeHints/unittests.js and 1 other location - About 1 day to fix
                src/extensions/default/UrlCodeHints/unittests.js on lines 506..522

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

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

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

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

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

                Refactorings

                Further Reading

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

                                filteredHints.forEach(function (element) {
                                    var $fHint = $("<span>")
                                        .addClass("brackets-hints");
                
                                    if (element.stringRanges) {
                Severity: Major
                Found in src/extensions/default/PhpTooling/CodeHintsProvider.js and 1 other location - About 1 day to fix
                src/languageTools/DefaultProviders.js on lines 133..154

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

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

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

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

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

                Refactorings

                Further Reading

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

                                filteredHints.forEach(function (element) {
                                    var $fHint = $("<span>")
                                        .addClass("brackets-hints");
                
                                    if (element.stringRanges) {
                Severity: Major
                Found in src/languageTools/DefaultProviders.js and 1 other location - About 1 day to fix
                src/extensions/default/PhpTooling/CodeHintsProvider.js on lines 137..158

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

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

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

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

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

                Refactorings

                Further Reading

                File strings.js has 508 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                /*
                 * Copyright (c) 2012 - present Adobe Systems Incorporated. All rights reserved.
                 *
                 * Permission is hereby granted, free of charge, to any person obtaining a
                 * copy of this software and associated documentation files (the "Software"),
                Severity: Major
                Found in src/nls/nl/strings.js - About 1 day to fix

                  File unittests.js has 507 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

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

                    File ColorEditor.js has 502 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

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

                      File QuickOpen.js has 496 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

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

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

                            DOMUpdater.prototype._handleDeletions = function (nodeMap, oldSubtreeMap, newSubtreeMap) {
                                var deletedIDs = [];
                                Object.keys(oldSubtreeMap).forEach(function (key) {
                                    if (!newSubtreeMap.hasOwnProperty(key)) {
                                        deletedIDs.push(key);
                        src/language/HTMLInstrumentation.js on lines 433..452

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

                        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

                            DOMUpdater.prototype._handleDeletions = function (nodeMap, oldSubtreeMap, newSubtreeMap) {
                                var deletedIDs = [];
                                Object.keys(oldSubtreeMap).forEach(function (key) {
                                    if (!newSubtreeMap.hasOwnProperty(key)) {
                                        deletedIDs.push(key);
                        Severity: Major
                        Found in src/language/HTMLInstrumentation.js and 1 other location - About 7 hrs to fix
                        src/LiveDevelopment/MultiBrowserImpl/language/HTMLInstrumentation.js on lines 402..421

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

                        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