adobe/brackets

View on GitHub

Showing 3,294 of 3,294 total issues

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

            runs(function () {
                SpecRunnerUtils.createTestWindowAndRun(this, function (w) {
                    testWindow = w;
                    $ = testWindow.$;
                    brackets        = testWindow.brackets;
Severity: Major
Found in src/extensions/default/RemoteFileAdapter/unittests.js and 1 other location - About 7 hrs to fix
src/extensions/default/CloseOthers/unittests.js on lines 83..96

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

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

            runs(function () {
                SpecRunnerUtils.createTestWindowAndRun(this, function (w) {
                    testWindow = w;
                    $ = testWindow.$;
                    brackets        = testWindow.brackets;
Severity: Major
Found in src/extensions/default/CloseOthers/unittests.js and 1 other location - About 7 hrs to fix
src/extensions/default/RemoteFileAdapter/unittests.js on lines 70..83

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

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 493 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/SVGCodeHints/unittests.js - About 7 hrs to fix

    Function Inspector has 195 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    define(function Inspector(require, exports, module) {
        "use strict";
    
        var Async           = require("utils/Async"),
            EventDispatcher = require("utils/EventDispatcher");
    Severity: Major
    Found in src/LiveDevelopment/Inspector/Inspector.js - About 7 hrs to fix

      Function colorAndGradientPreviewProvider has 195 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function colorAndGradientPreviewProvider(editor, pos, token, line) {
      
              // Check for gradient. -webkit-gradient() can have parens in parameters
              // nested 2 levels. Other gradients can only nest 1 level.
              var gradientRegEx = /-webkit-gradient\((?:[^\(]*?(?:\((?:[^\(]*?(?:\([^\)]*?\))*?)*?\))*?)*?\)|(?:(?:-moz-|-ms-|-o-|-webkit-|:|\s)((repeating-)?linear-gradient)|(?:-moz-|-ms-|-o-|-webkit-|:|\s)((repeating-)?radial-gradient))(\((?:[^\)]*?(?:\([^\)]*?\))*?)*?\))/gi,
      Severity: Major
      Found in src/extensions/default/QuickView/main.js - About 7 hrs to fix

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

                        runs(function () {
                            expect(hintsObj).toBeTruthy();
                            expect(hintsObj.hints).toBeTruthy();
                            expect(hintsObj.hints.length).toBe(1);
                            expect(hintsObj.hints[0]).toBe("subfolder/chevron.png");
        Severity: Major
        Found in src/extensions/default/UrlCodeHints/unittests.js and 1 other location - About 7 hrs to fix
        src/extensions/default/UrlCodeHints/unittests.js on lines 456..470

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

        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

                        runs(function () {
                            expect(hintsObj).toBeTruthy();
                            expect(hintsObj.hints).toBeTruthy();
                            expect(hintsObj.hints.length).toBe(2);
                            expect(hintsObj.hints[1]).toBe("test.html");
        Severity: Major
        Found in src/extensions/default/UrlCodeHints/unittests.js and 1 other location - About 7 hrs to fix
        src/extensions/default/UrlCodeHints/unittests.js on lines 640..654

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

        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 strings.js has 491 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/nls/id/strings.js - About 7 hrs to fix

          Function _create has 194 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              _create: function() {
                  // Some browsers only repeat keydown events, not keypress events,
                  // so we use the suppressKeyPress flag to determine if we've already
                  // handled the keydown event. #7269
                  // Unfortunately the code for & in keypress is the same as the up arrow,

            Function hitTest has 194 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                        function hitTest(e) {
                            var pageY = $ghost.offset().top,
                                direction =  e.pageY - lastPageY,
                                result = {
                                    where: NOMANSLAND
            Severity: Major
            Found in src/project/WorkingSetView.js - About 7 hrs to fix

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

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

                File FileSystem.js has 488 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/filesystem/FileSystem.js - About 7 hrs to fix

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

                  jQuery(function($){
                      $.datepicker.regional['ar'] = {
                          closeText: 'إغلاق',
                          prevText: '<السابق',
                          nextText: 'التالي>',
                  src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-fa.js on lines 4..59
                  src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-sl.js on lines 4..24
                  src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-uk.js on lines 4..24

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

                  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

                  jQuery(function($){
                      $.datepicker.regional['uk'] = {
                          closeText: 'Закрити',
                          prevText: '<',
                          nextText: '>',
                  src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-ar.js on lines 4..23
                  src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-fa.js on lines 4..59
                  src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-sl.js on lines 4..24

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

                  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

                  jQuery(function($){
                      $.datepicker.regional['sl'] = {
                          closeText: 'Zapri',
                          prevText: '<Prejšnji',
                          nextText: 'Naslednji>',
                  src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-ar.js on lines 4..23
                  src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-fa.js on lines 4..59
                  src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-uk.js on lines 4..24

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

                  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 offsetToLineNum(textOrLines, offset) {
                          if (Array.isArray(textOrLines)) {
                              var lines = textOrLines,
                                  total = 0,
                                  line;
                  Severity: Major
                  Found in src/utils/StringUtils.js and 1 other location - About 7 hrs to fix
                  src/search/node/FindInFilesDomain.js on lines 68..94

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

                  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

                  jQuery(function($) {
                      $.datepicker.regional['fa'] = {
                          closeText: 'بستن',
                          prevText: '<قبلی',
                          nextText: 'بعدی>',
                  src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-ar.js on lines 4..23
                  src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-sl.js on lines 4..24
                  src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-uk.js on lines 4..24

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

                  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 offsetToLineNum(textOrLines, offset) {
                      if (Array.isArray(textOrLines)) {
                          var lines = textOrLines,
                              total = 0,
                              line;
                  Severity: Major
                  Found in src/search/node/FindInFilesDomain.js and 1 other location - About 7 hrs to fix
                  src/utils/StringUtils.js on lines 91..117

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

                  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 strings.js has 487 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/nls/fa-ir/strings.js - About 7 hrs to fix

                    File strings.js has 486 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/nls/ro/strings.js - About 7 hrs to fix
                      Severity
                      Category
                      Status
                      Source
                      Language