adobe/brackets

View on GitHub

Showing 3,294 of 3,294 total issues

Function normalizeKeyDescriptorString has 66 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function normalizeKeyDescriptorString(origDescriptor) {
        var hasMacCtrl = false,
            hasCtrl = false,
            hasAlt = false,
            hasShift = false,
Severity: Major
Found in src/command/KeyBindingManager.js - About 2 hrs to fix

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

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

      Function dispatch has 66 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          dispatch: function( event ) {
      
              // Make a writable jQuery.Event from the native event object
              event = jQuery.event.fix( event || window.event );
      
      

        Function load has 66 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        QUnit.load = function() {
            runLoggingCallbacks( "begin", QUnit, {} );
        
            // Initialize the config, saving the execution queue
            var banner, filter, i, label, len, main, ol, toolbar, userAgent, val,

          Function getHints has 66 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              AttrHints.prototype.getHints = function (implicitChar) {
                  var cursor = this.editor.getCursorPos(),
                      query = {queryStr: null},
                      tokenType,
                      offset,
          Severity: Major
          Found in src/extensions/default/HTMLCodeHints/main.js - About 2 hrs to fix

            Function insertHint has 66 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                CssPropHints.prototype.insertHint = function (hint) {
                    var offset = this.info.offset,
                        cursor = this.editor.getCursorPos(),
                        start = {line: -1, ch: -1},
                        end = {line: -1, ch: -1},
            Severity: Major
            Found in src/extensions/default/CSSCodeHints/main.js - About 2 hrs to fix

              Function getAllScopes has 66 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function getAllScopes(ast, scope, fullText) {
                      var curScope = scope;
                      var cnt = 0;
                      var scopes = [];
              
              
              Severity: Major
              Found in src/extensions/default/JavaScriptRefactoring/RefactoringUtils.js - About 2 hrs to fix

                Function render has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        render: function () {
                            var entry = this.props.entry,
                                nodeClass,
                                childNodes,
                                children = entry.get("children"),
                Severity: Major
                Found in src/project/FileTreeView.js - About 2 hrs to fix

                  Function setMatcher has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
                      if ( postFilter && !postFilter[ expando ] ) {
                          postFilter = setMatcher( postFilter );
                      }
                      if ( postFinder && !postFinder[ expando ] ) {
                  Severity: Major
                  Found in src/thirdparty/jquery-2.1.3.js - About 2 hrs to fix

                    File main.js has 276 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    /*
                     * Copyright (c) 2015 - 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/extensions/default/PrefsCodeHints/main.js - About 2 hrs to fix

                      Function validateCallback has 65 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          function validateCallback(err, validationResult) {
                              validationResult.localPath = packagePath;
                      
                              // This is a wrapper for the callback that will delete the temporary
                              // directory to which the package was unzipped.
                      Severity: Major
                      Found in src/extensibility/node/ExtensionManagerDomain.js - About 2 hrs to fix

                        Function insertHint has 65 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            PrefsCodeHints.prototype.insertHint = function (completion) {
                                var ctxInfo = JSONUtils.getContextInfo(this.editor, this.editor.getCursorPos(), false, true),
                                    pos     = this.editor.getCursorPos(),
                                    start   = {line: -1, ch: -1},
                                    end     = {line: -1, ch: -1},
                        Severity: Major
                        Found in src/extensions/default/PrefsCodeHints/main.js - About 2 hrs to fix

                          Function CSSPreprocessorDocumentModule has 65 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          define(function CSSPreprocessorDocumentModule(require, exports, module) {
                              "use strict";
                          
                              var _               = require("thirdparty/lodash"),
                                  EventDispatcher = require("utils/EventDispatcher"),
                          Severity: Major
                          Found in src/LiveDevelopment/Documents/CSSPreprocessorDocument.js - About 2 hrs to fix

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

                                init: function( selector, context, rootjQuery ) {
                                    var match, elem, ret, doc;
                            
                                    // Handle $(""), $(null), or $(undefined)
                                    if ( !selector ) {

                              Function _receive has 65 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  NodeConnection.prototype._receive = function (message) {
                                      var responseDeferred = null;
                                      var data = message.data;
                                      var m;
                              
                              
                              Severity: Major
                              Found in src/utils/NodeConnection.js - About 2 hrs to fix

                                Method writeDocument has 65 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    def writeDocument
                                        @out.write <<-eos
                                <!DOCTYPE html>
                                <html>
                                <head>
                                Severity: Major
                                Found in src/LiveDevelopment/Inspector/jsdoc.rb - About 2 hrs to fix

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

                                              it("should NOT list hints on incomplete tag, at end of tag name", function () {
                                                  testEditor.setCursorPos({ line: 9, ch: 5 });    // end of tag name
                                                  expectNoHints(HTMLCodeHints.attrHintProvider);
                                  
                                                  testEditor.setCursorPos({ line: 9, ch: 6 });    // within tag name
                                  Severity: Major
                                  Found in src/extensions/default/HTMLCodeHints/unittests.js and 3 other locations - About 2 hrs to fix
                                  src/extensions/default/HTMLCodeHints/unittests.js on lines 206..211
                                  src/extensions/default/HTMLCodeHints/unittests.js on lines 258..264
                                  src/extensions/default/HTMLCodeHints/unittests.js on lines 265..271

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

                                  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

                                              this.element.siblings( ":visible" ).each(function() {
                                                  var elem = $( this ),
                                                      position = elem.css( "position" );
                                  
                                                  if ( position === "absolute" || position === "fixed" ) {
                                  src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/jquery.ui.tabs.js on lines 506..514

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

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

                                              it("should NOT list hints within text content or whitespace", function () {
                                                  testEditor.setCursorPos({ line: 5, ch: 0 });    // whitespace
                                                  expectNoHints(HTMLCodeHints.attrHintProvider);
                                  
                                                  testEditor.setCursorPos({ line: 5, ch: 18 });   // plain text content
                                  Severity: Major
                                  Found in src/extensions/default/HTMLCodeHints/unittests.js and 3 other locations - About 2 hrs to fix
                                  src/extensions/default/HTMLCodeHints/unittests.js on lines 206..211
                                  src/extensions/default/HTMLCodeHints/unittests.js on lines 258..264
                                  src/extensions/default/HTMLCodeHints/unittests.js on lines 344..350

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

                                  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 FindUtils.js has 275 lines of code (exceeds 250 allowed). Consider refactoring.
                                  Open

                                  /*
                                   * Copyright (c) 2014 - 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/FindUtils.js - About 2 hrs to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language