adobe/brackets

View on GitHub

Showing 3,294 of 3,294 total issues

File unittests.js has 1333 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/unittests.js - About 3 days to fix

    Function LiveDevelopment has a Cognitive Complexity of 168 (exceeds 5 allowed). Consider refactoring.
    Open

    define(function LiveDevelopment(require, exports, module) {
        "use strict";
    
        require("utils/Global");
    
    
    Severity: Minor
    Found in src/LiveDevelopment/LiveDevelopment.js - About 3 days 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

    File unittests.js has 1267 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/unittests.js - About 3 days to fix

      Function jQuery has 614 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      var jQuery = (function() {
      
      // Define a local copy of jQuery
      var jQuery = function( selector, context ) {
              // The jQuery object is actually just the init constructor 'enhanced'

        Function lex has 607 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            var lex = (function lex() {
                var character, from, line, s;
        
        // Private lex methods
        
        

          File globalize.js has 1162 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          /*!
           * Globalize
           *
           * http://github.com/jquery/globalize
           *

            File CSSUtils.js has 1138 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/language/CSSUtils.js - About 2 days to fix

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

                          it("should insert folder and replace file in CSS", function () {
                              var pos1    = { line: 10, ch: 24 },
                                  pos2    = { line: 10, ch: 34 },
                                  pos3    = { line: 10, ch: 43 },
                                  pos4    = { line: 10, ch: 45 };
              Severity: Major
              Found in src/extensions/default/UrlCodeHints/unittests.js and 1 other location - About 2 days to fix
              src/extensions/default/UrlCodeHints/unittests.js on lines 580..627

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

              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

                          it("should insert folder and replace file in HTML", function () {
                              var pos1    = { line: 23, ch: 11 },
                                  pos2    = { line: 23, ch: 21 },
                                  pos3    = { line: 23, ch: 31 },
                                  pos4    = { line: 23, ch: 32 };
              Severity: Major
              Found in src/extensions/default/UrlCodeHints/unittests.js and 1 other location - About 2 days to fix
              src/extensions/default/UrlCodeHints/unittests.js on lines 705..752

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

              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 DocumentCommandHandlers.js has 1116 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/document/DocumentCommandHandlers.js - About 2 days to fix

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

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

                  Function DOMNodeModule has a Cognitive Complexity of 132 (exceeds 5 allowed). Consider refactoring.
                  Open

                  define(function DOMNodeModule(require, exports, module) {
                      "use strict";
                  
                      var DOMHelpers = require("LiveDevelopment/Agents/DOMHelpers");
                  
                  
                  Severity: Minor
                  Found in src/LiveDevelopment/Agents/DOMNode.js - About 2 days 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

                          ProjectManager.getAllFiles().done(function (allFiles) {
                              var projectRoot = ProjectManager.getProjectRoot().fullPath,
                                  containingFolder,
                                  indexFileFound = false,
                                  stillInProjectTree = true;
                  Severity: Major
                  Found in src/LiveDevelopment/LiveDevMultiBrowser.js and 1 other location - About 2 days to fix
                  src/LiveDevelopment/LiveDevelopment.js on lines 709..766

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

                  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

                          ProjectManager.getAllFiles().done(function (allFiles) {
                              var projectRoot = ProjectManager.getProjectRoot().fullPath,
                                  containingFolder,
                                  indexFileFound = false,
                                  stillInProjectTree = true;
                  Severity: Major
                  Found in src/LiveDevelopment/LiveDevelopment.js and 1 other location - About 2 days to fix
                  src/LiveDevelopment/LiveDevMultiBrowser.js on lines 374..431

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

                  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 PreferencesBase.js has 998 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/preferences/PreferencesBase.js - About 2 days to fix

                    Function token has 491 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                                token: function () {
                                    var b, c, captures, d, depth, high, i, l, low, q, t, isLiteral, isInRange;
                    
                                    function match(x) {
                                        var r = x.exec(s), r1;

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

                          DOMUpdater.prototype.update = function () {
                              var markCache = {},
                                  newSubtree = this.build(true, markCache),
                                  result = {
                                      // default result if we didn't identify a changed portion
                      Severity: Major
                      Found in src/language/HTMLInstrumentation.js and 1 other location - About 2 days to fix
                      src/LiveDevelopment/MultiBrowserImpl/language/HTMLInstrumentation.js on lines 435..499

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

                      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.update = function () {
                              var markCache = {},
                                  newSubtree = this.build(true, markCache),
                                  result = {
                                      // default result if we didn't identify a changed portion
                      src/language/HTMLInstrumentation.js on lines 466..530

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

                      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 ScopeManager.js has 936 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/JSUtils/ScopeManager.js - About 2 days to fix

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

                                    } else if (token.type === "opentagname") {
                                        var newTagName = token.contents.toLowerCase(),
                                            newTag;
                        
                                        if (openImpliesClose.hasOwnProperty(newTagName)) {
                        Severity: Major
                        Found in src/LiveDevelopment/MultiBrowserImpl/language/HTMLSimpleDOM.js and 1 other location - About 2 days to fix
                        src/language/HTMLSimpleDOM.js on lines 342..481

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

                        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