adobe/brackets

View on GitHub

Showing 3,294 of 3,294 total issues

Function lintOneFile has 35 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function lintOneFile(text, fullPath) {
        // If a line contains only whitespace (here spaces or tabs), remove the whitespace
        text = text.replace(/^[ \t]+$/gm, "");

        var options = prefs.get("options");
Severity: Minor
Found in src/extensions/default/JSLint/main.js - About 1 hr to fix

    Function checkUpdateStatus has 35 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function checkUpdateStatus() {
            var filesToCache = ['.logs'],
                downloadCompleted = updateJsonHandler.get("downloadCompleted"),
                updateInitiatedInPrevSession = updateJsonHandler.get("updateInitiatedInPrevSession");
    
    
    Severity: Minor
    Found in src/extensions/default/AutoUpdate/main.js - About 1 hr to fix

      Function scanTextUntil has 35 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function scanTextUntil(cm, startCh, startLine, condition) {
              var line = cm.getLine(startLine),
                  seen = "",
                  characterIndex = startCh,
                  currentLine = startLine,
      Severity: Minor
      Found in src/extensions/default/CodeFolding/foldhelpers/handlebarsFold.js - About 1 hr to fix

        Function _toggle has 35 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            _toggle: function( data ) {
                var toShow = data.newPanel,
                    toHide = this.prevShow.length ? this.prevShow : data.oldPanel;
        
                // handle activating a panel during the animation for another activation

          Function _resetButton has 35 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              _resetButton: function() {
                  if ( this.type === "input" ) {
                      if ( this.options.label ) {
                          this.element.val( this.options.label );
                      }

            Function pulsate has 35 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            $.effects.effect.pulsate = function( o, done ) {
                var elem = $( this ),
                    mode = $.effects.setMode( elem, o.mode || "show" ),
                    show = mode === "show",
                    hide = mode === "hide",

              Function close has 35 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  close: function( event ) {
                      var that = this,
                          maxZ, thisZ;
              
                      if ( !this._isOpen ) {

                Function _open has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    _open: function( event, target, content ) {
                        if ( !content ) {
                            return;
                        }
                
                

                  Function assignop has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      function assignop(s, f) {
                          symbol(s, 20).exps = true;
                          return infix(s, function (left, that) {
                              var l;
                              that.left = left;

                    Function visit has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        FileSystemEntry.prototype.visit = function (visitor, options, callback) {
                            if (typeof options === "function") {
                                callback = options;
                                options = {};
                            } else {
                    Severity: Minor
                    Found in src/filesystem/FileSystemEntry.js - About 1 hr to fix

                      Function _handleSelectionKeydown has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          ColorEditor.prototype._handleSelectionKeydown = function (event) {
                              var hsv = {},
                                  step = 1.5,
                                  xOffset,
                                  yOffset,
                      Severity: Minor
                      Found in src/extensions/default/InlineColorEditor/ColorEditor.js - About 1 hr to fix

                        Function extractToVariable has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            function extractToVariable(ast, start, end, text, scopes) {
                                var doc                   = session.editor.document,
                                    editor = EditorManager.getActiveEditor(),
                                    parentExpn            = RefactoringUtils.getExpression(ast, start, end, doc.getText()),
                                    expns                 = [],
                        Severity: Minor
                        Found in src/extensions/default/JavaScriptRefactoring/ExtractToVariable.js - About 1 hr to fix

                          Function access has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          var access = jQuery.access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
                              var i = 0,
                                  len = elems.length,
                                  bulk = key == null;
                          
                          
                          Severity: Minor
                          Found in src/thirdparty/jquery-2.1.3.js - About 1 hr to fix

                            Function showHide has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            function showHide( elements, show ) {
                                var display, elem, hidden,
                                    values = [],
                                    index = 0,
                                    length = elements.length;
                            Severity: Minor
                            Found in src/thirdparty/jquery-2.1.3.js - About 1 hr to fix

                              Function dispatch has 35 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 );
                              
                              
                              Severity: Minor
                              Found in src/thirdparty/jquery-2.1.3.js - About 1 hr to fix

                                Function _getSucceedingPropValues has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    function _getSucceedingPropValues(ctx, currentValue) {
                                        var lastValue = currentValue,
                                            propValues = [];
                                
                                        while (ctx.token.string !== ";" && ctx.token.string !== "}" && TokenUtils.moveNextToken(ctx)) {
                                Severity: Minor
                                Found in src/language/CSSUtils.js - About 1 hr to fix

                                  Function _extractAttrVal has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      function _extractAttrVal(ctx) {
                                          var attrValue = ctx.token.string,
                                              startChar = attrValue.charAt(0),
                                              endChar = attrValue.charAt(attrValue.length - 1),
                                              offset = TokenUtils.offsetInToken(ctx),
                                  Severity: Minor
                                  Found in src/language/HTMLUtils.js - About 1 hr to fix

                                    Function hashBytes has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        hashBytes: function(data, len, seed) {
                                            var c1 = 0xcc9e2d51, c2 = 0x1b873593;
                                    
                                            var h1 = seed;
                                            var roundedEnd = len & ~0x3;
                                    Severity: Minor
                                    Found in src/thirdparty/murmurhash3_gc.js - About 1 hr to fix

                                      Function _openReferencesPanel has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          function _openReferencesPanel() {
                                              var editor = EditorManager.getActiveEditor(),
                                                  pos = editor ? editor.getCursorPos() : null,
                                                  referencesPromise,
                                                  result = new $.Deferred(),
                                      Severity: Minor
                                      Found in src/features/FindReferencesManager.js - About 1 hr to fix

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

                                                        spyOn(Dialogs, 'showModalDialog').andCallFake(function (dlgClass, title, message, buttons) {
                                                            console.warn(title, message);
                                                            return {done: function (callback) { callback(Dialogs.DIALOG_BTN_OK); } };
                                                        });
                                        Severity: Major
                                        Found in src/extensions/default/RemoteFileAdapter/unittests.js and 3 other locations - About 1 hr to fix
                                        src/extensions/default/RemoteFileAdapter/unittests.js on lines 105..108
                                        src/extensions/default/RemoteFileAdapter/unittests.js on lines 118..121
                                        src/extensions/default/RemoteFileAdapter/unittests.js on lines 134..137

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

                                        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