adobe/brackets

View on GitHub

Showing 3,294 of 3,294 total issues

File HTMLDOMDiff.js has 298 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/HTMLDOMDiff.js - About 3 hrs to fix

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

                  } else {
                    elStyling['height'] = elementStyling.getPropertyValue('padding-' + side);  
                    elStyling['width'] = innerWidth + "px";
                    elStyling['left'] = 0;
                      
    Severity: Major
    Found in src/LiveDevelopment/Agents/RemoteFunctions.js and 1 other location - About 3 hrs to fix
    src/LiveDevelopment/Agents/RemoteFunctions.js on lines 323..332

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

    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 (visualisations.horizontal.indexOf(side) >= 0) {
                    elStyling['width'] =  elementStyling.getPropertyValue('padding-' + side);
                    elStyling['height'] = innerHeight + "px";
                    elStyling['top'] = 0;
                      
    Severity: Major
    Found in src/LiveDevelopment/Agents/RemoteFunctions.js and 1 other location - About 3 hrs to fix
    src/LiveDevelopment/Agents/RemoteFunctions.js on lines 332..340

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

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

        function _getUpdateInformation(force, dontCache, _versionInfoUrl) {
            // Last time the versionInfoURL was fetched
            var lastInfoURLFetchTime = PreferencesManager.getViewState("lastInfoURLFetchTime");
    
            var result = new $.Deferred();
    Severity: Major
    Found in src/utils/UpdateNotification.js - About 3 hrs to fix

      Function sliceFactory has 78 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        function sliceFactory(iterable, begin, end, useKeys) {
          var originalSize = iterable.size;
      
          // Sanitize begin & end using this shorthand for ToInt32(argument)
          // http://www.ecma-international.org/ecma-262/6.0/#sec-toint32
      Severity: Major
      Found in src/thirdparty/immutable.js - About 3 hrs to fix

        File bootstrap-twipsy-mod.js has 296 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        /* ==========================================================
         * bootstrap-twipsy.js v1.4.0
         * http://twitter.github.com/bootstrap/javascript.html#twipsy
         * Adapted from the original jQuery.tipsy by Jason Frame
         * Adjusted for Brackets
        Severity: Minor
        Found in src/widgets/bootstrap-twipsy-mod.js - About 3 hrs to fix

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

                  opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
                      opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;
          src/thirdparty/jquery-2.1.3.js on lines 6675..6676

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

          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(checkSet, part, isXML){
                      var nodeCheck,
                          doneName = done++,
                          checkFn = dirCheck;
          
          
          src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/jquery-1.7.2.js on lines 4413..4425

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

          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( checkSet, part, isXML ) {
                      var nodeCheck,
                          doneName = done++,
                          checkFn = dirCheck;
          
          
          src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/jquery-1.7.2.js on lines 4399..4411

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

          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 ( ontype && elem[ type ] && ((type !== "focus" && type !== "blur") || event.target.offsetWidth !== 0) && !jQuery.isWindow( elem ) ) {
          
                              // Don't re-trigger an onFOO event when we call its FOO() method
                              old = elem[ ontype ];
          
          
          src/thirdparty/jquery-2.1.3.js on lines 4367..4384

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

          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 ( ontype && jQuery.isFunction( elem[ type ] ) && !jQuery.isWindow( elem ) ) {
          
                              // Don't re-trigger an onFOO event when we call its FOO() method
                              tmp = elem[ ontype ];
          
          
          Severity: Major
          Found in src/thirdparty/jquery-2.1.3.js and 1 other location - About 3 hrs to fix
          src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/jquery-1.7.2.js on lines 3230..3247

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

          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

              opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
                  opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;
          Severity: Major
          Found in src/thirdparty/jquery-2.1.3.js and 1 other location - About 3 hrs to fix
          src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/jquery-1.7.2.js on lines 8735..8736

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

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

              Editor.prototype.displayErrorMessageAtCursor = function (errorMsg) {
                  var arrowBelow, cursorPos, cursorCoord, popoverRect,
                      top, left, clip, arrowCenter, arrowLeft,
                      self = this,
                      POPOVER_MARGIN = 10,
          Severity: Major
          Found in src/editor/Editor.js - About 3 hrs to fix

            Function imagePreviewProvider has 77 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                function imagePreviewProvider(editor, pos, token, line) {
                    var cm = editor._codeMirror;
            
                    // Check for image name
                    var urlRegEx = /url\(([^\)]*)\)/gi,
            Severity: Major
            Found in src/extensions/default/QuickView/main.js - About 3 hrs to fix

              Function Deferred has 77 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  Deferred: function( func ) {
                      var doneList = jQuery.Callbacks( "once memory" ),
                          failList = jQuery.Callbacks( "once memory" ),
                          progressList = jQuery.Callbacks( "memory" ),
                          state = "pending",

                Function watchPath has 77 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function watchPath(path, ignored, _watcherMap) {
                
                    var ignoreMatcher = buildMatcher(ignored);
                    var closing = false;
                
                
                Severity: Major
                Found in src/filesystem/impls/appshell/node/CSharpWatcher.js - About 3 hrs to fix

                  Function _loadViewState has 77 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      function _loadViewState(e) {
                          // file root is appended for each project
                          var panes,
                              promises = [],
                              context = { location : { scope: "user",
                  Severity: Major
                  Found in src/view/MainViewManager.js - About 3 hrs to fix

                    Function doSave has 77 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        function doSave(docToSave, force) {
                            var result = new $.Deferred(),
                                file = docToSave.file;
                    
                            function handleError(error) {
                    Severity: Major
                    Found in src/document/DocumentCommandHandlers.js - About 3 hrs to fix

                      File grunt.js has 294 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      /*jshint node: true */
                      module.exports = function( grunt ) {
                      
                      var // modules
                          fs = require( "fs" ),

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

                            function _markTags(cm, node) {
                                node.children.forEach(function (childNode) {
                                    if (childNode.isElement()) {
                                        _markTags(cm, childNode);
                                    }
                        src/language/HTMLInstrumentation.js on lines 223..231

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

                        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