adobe/brackets

View on GitHub

Showing 3,294 of 3,294 total issues

File EditorCommandHandlers.js has 703 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/editor/EditorCommandHandlers.js - About 1 day to fix

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

                it("should extract a line inside a class to a class method", function () {
                    testEditor.setSelection({line: 104, ch: 8}, {line: 104, ch: 29});
    
                    var prevDocLength = testDoc.getText().length;
                    var result = ExtractToFunction.handleExtractToFunction();
    Severity: Major
    Found in src/extensions/default/JavaScriptRefactoring/unittests.js and 1 other location - About 1 day to fix
    src/extensions/default/JavaScriptRefactoring/unittests.js on lines 574..601

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

    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 extract a line inside a class to global scope", function () {
                    testEditor.setSelection({line: 104, ch: 8}, {line: 104, ch: 29});
    
                    var prevDocLength = testDoc.getText().length;
                    var result = ExtractToFunction.handleExtractToFunction();
    Severity: Major
    Found in src/extensions/default/JavaScriptRefactoring/unittests.js and 1 other location - About 1 day to fix
    src/extensions/default/JavaScriptRefactoring/unittests.js on lines 545..572

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

    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 jquery.ui.dialog.js has 671 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

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

      Function DOMAgent has a Cognitive Complexity of 75 (exceeds 5 allowed). Consider refactoring.
      Open

      define(function DOMAgent(require, exports, module) {
          "use strict";
      
          var Inspector       = require("LiveDevelopment/Inspector/Inspector"),
              EventDispatcher = require("utils/EventDispatcher"),
      Severity: Minor
      Found in src/LiveDevelopment/Agents/DOMAgent.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

      File strings.js has 662 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/nls/fi/strings.js - About 1 day to fix

        File unittests.js has 661 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/CSSCodeHints/unittests.js - About 1 day to fix

          File strings.js has 658 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/de/strings.js - About 1 day to fix

            File strings.js has 657 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/pl/strings.js - About 1 day to fix

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

                  function _processBrowserSimpleDOM(browserRoot, editorRootTagID) {
                      var nodeMap         = {},
                          root;
              
                      function _processElement(elem) {
              src/language/HTMLInstrumentation.js on lines 626..667

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

              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

                  function _processBrowserSimpleDOM(browserRoot, editorRootTagID) {
                      var nodeMap         = {},
                          root;
              
                      function _processElement(elem) {
              Severity: Major
              Found in src/language/HTMLInstrumentation.js and 1 other location - About 1 day to fix
              src/LiveDevelopment/MultiBrowserImpl/language/HTMLInstrumentation.js on lines 600..641

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

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

              module.exports = function( grunt ) {
              
              var // modules
                  fs = require( "fs" ),
                  path = require( "path" ),

                File globmatch.js has 649 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                // This is a slightly modified version of the minimatch library
                // https://github.com/isaacs/minimatch
                // (MIT-licensed, Copyright 2009-2011 Isaac Z. Schlueter)
                //
                // It has been modified to work properly with RequireJS and
                Severity: Major
                Found in src/thirdparty/globmatch.js - About 1 day to fix

                  File strings.js has 641 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/nls/zh-cn/strings.js - About 1 day to fix

                    File strings.js has 636 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/bg/strings.js - About 1 day to fix

                      File strings.js has 636 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/lv/strings.js - About 1 day to fix

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

                                    it("should show & insert case insensitive hints in HTML", function () {
                                        var pos1    = { line: 18, ch: 12 },
                                            pos2    = { line: 18, ch: 13 },
                                            pos3    = { line: 18, ch: 21 };
                        
                        
                        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 878..902

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

                        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 show & insert case insensitive hints in CSS", function () {
                                        var pos1    = { line: 6, ch: 24 },
                                            pos2    = { line: 6, ch: 25 },
                                            pos3    = { line: 6, ch: 33 };
                        
                        
                        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 852..876

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

                        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 unittests.js has 635 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/UrlCodeHints/unittests.js - About 1 day to fix

                          File strings.js has 634 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/it/strings.js - About 1 day to fix
                            Severity
                            Category
                            Status
                            Source
                            Language