adobe/brackets

View on GitHub

Showing 3,294 of 3,294 total issues

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

        getPadding: function (padding) {
            var p = (typeof padding === "number") ? [padding] : padding;

            if (p.length === 1) {
                p[1] = p[0];
src/extensions/default/InlineTimingFunctionEditor/StepEditor.js on lines 221..235

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

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

        getPadding: function (padding) {
            var p = (typeof padding === "number") ? [padding] : padding;

            if (p.length === 1) {
                p[1] = p[0];
src/extensions/default/InlineTimingFunctionEditor/BezierCurveEditor.js on lines 218..232

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

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

        x.nud = function () {
            var b, f, i, j, p, t;
            var props = {}; // All properties, including accessors

            function saveProperty(name, token) {

    Function diff has 114 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    QUnit.diff = (function() {
        function diff( o, n ) {
            var i,
                ns = {},
                os = {};

      Function braceExpand has 114 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function braceExpand (pattern, options) {
        options = options || this.options
        pattern = typeof pattern === "undefined"
          ? this.pattern : pattern
      
      
      Severity: Major
      Found in src/thirdparty/globmatch.js - About 4 hrs to fix

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

                if ( this._hasScroll() ) {
                    var base = this.active.offset().top,
                        height = this.element.height(),
                        result;
                    this.active.nextAll( ".ui-menu-item" ).each(function() {
        src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/jquery.ui.menu.js on lines 576..588

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

        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

                if ( this._hasScroll() ) {
                    var base = this.active.offset().top,
                        height = this.element.height(),
                        result;
                    this.active.prevAll( ".ui-menu-item" ).each(function() {
        src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/jquery.ui.menu.js on lines 552..565

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

        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 DOMNode.js has 356 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/LiveDevelopment/Agents/DOMNode.js - About 4 hrs to fix

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

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

            Function _enterState has 112 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                InstallExtensionDialog.prototype._enterState = function (newState) {
                    var url,
                        msg,
                        self = this,
                        prevState = this._state;
            Severity: Major
            Found in src/extensibility/InstallExtensionDialog.js - About 4 hrs to fix

              Function init has 112 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function init(domainManager) {
                  _domainManager = domainManager;
              
                  if (!domainManager.hasDomain("staticServer")) {
                      domainManager.registerDomain("staticServer", {major: 0, minor: 1});
              Severity: Major
              Found in src/extensions/default/StaticServer/node/StaticServerDomain.js - About 4 hrs to fix

                File HTMLSimpleDOM.js has 353 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/language/HTMLSimpleDOM.js - About 4 hrs to fix

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

                              it("should convert selected function to arrow function with two param and one return statement", function() {
                                  testEditor.setSelection({line: 146, ch: 6}, {line: 146, ch: 6});
                  
                                  var prevDoc = testDoc.getText();
                  
                  
                  Severity: Major
                  Found in src/extensions/default/JavaScriptRefactoring/unittests.js and 2 other locations - About 4 hrs to fix
                  src/extensions/default/JavaScriptRefactoring/unittests.js on lines 712..722
                  src/extensions/default/JavaScriptRefactoring/unittests.js on lines 724..734

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

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

                              it("should convert selected function to arrow function with one param and one return statement", function() {
                                  testEditor.setSelection({line: 150, ch: 6}, {line: 150, ch: 6});
                  
                                  var prevDoc = testDoc.getText();
                  
                  
                  Severity: Major
                  Found in src/extensions/default/JavaScriptRefactoring/unittests.js and 2 other locations - About 4 hrs to fix
                  src/extensions/default/JavaScriptRefactoring/unittests.js on lines 700..710
                  src/extensions/default/JavaScriptRefactoring/unittests.js on lines 724..734

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

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

                              it("should convert selected function to arrow function with two param and two statements", function() {
                                  testEditor.setSelection({line: 154, ch: 6}, {line: 154, ch: 6});
                  
                                  var prevDoc = testDoc.getText();
                  
                  
                  Severity: Major
                  Found in src/extensions/default/JavaScriptRefactoring/unittests.js and 2 other locations - About 4 hrs to fix
                  src/extensions/default/JavaScriptRefactoring/unittests.js on lines 700..710
                  src/extensions/default/JavaScriptRefactoring/unittests.js on lines 712..722

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

                  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

                          QuickOpen.addQuickOpenPlugin({
                              name: "PHP Document Symbols",
                              label: Strings.CMD_FIND_DOCUMENT_SYMBOLS + "\u2026",
                              languageIds: ["php"],
                              search: dSymProvider.search.bind(dSymProvider),
                  Severity: Major
                  Found in src/extensions/default/PhpTooling/main.js and 1 other location - About 4 hrs to fix
                  src/extensions/default/PhpTooling/main.js on lines 151..160

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

                  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

                          QuickOpen.addQuickOpenPlugin({
                              name: "PHP Project Symbols",
                              label: Strings.CMD_FIND_PROJECT_SYMBOLS + "\u2026",
                              languageIds: ["php"],
                              search: pSymProvider.search.bind(pSymProvider),
                  Severity: Major
                  Found in src/extensions/default/PhpTooling/main.js and 1 other location - About 4 hrs to fix
                  src/extensions/default/PhpTooling/main.js on lines 139..148

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

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

                  function init(domainManager) {
                      if (!domainManager.hasDomain("FindInFiles")) {
                          domainManager.registerDomain("FindInFiles", {major: 0, minor: 1});
                      }
                      _domainManager = domainManager;
                  Severity: Major
                  Found in src/search/node/FindInFilesDomain.js - About 4 hrs to fix

                    Function report has 110 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        itself.report = function (option) {
                            var data = itself.data();
                    
                            var a = [], c, e, err, f, i, k, l, m = '', n, o = [], s;
                    
                    

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

                        $.fn.tooltip = function ( option ) {
                          return this.each(function () {
                            var $this = $(this)
                              , data = $this.data('tooltip')
                              , options = typeof option == 'object' && option
                      Severity: Major
                      Found in src/widgets/bootstrap-tooltip.js and 2 other locations - About 4 hrs to fix
                      src/widgets/bootstrap-popover.js on lines 86..94
                      src/widgets/bootstrap-scrollspy.js on lines 125..133

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

                      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