adobe/brackets

View on GitHub

Showing 3,294 of 3,294 total issues

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

            it("should hint in the center of a key", function () {
                var hintList;

                // In "language"
                testEditor.setCursorPos({line: 9, ch: 9});
Severity: Major
Found in src/extensions/default/PrefsCodeHints/unittests.js and 7 other locations - About 6 hrs to fix
src/extensions/default/PrefsCodeHints/unittests.js on lines 195..212
src/extensions/default/PrefsCodeHints/unittests.js on lines 231..248
src/extensions/default/PrefsCodeHints/unittests.js on lines 326..343
src/extensions/default/PrefsCodeHints/unittests.js on lines 344..361
src/extensions/default/PrefsCodeHints/unittests.js on lines 375..392
src/extensions/default/PrefsCodeHints/unittests.js on lines 393..410
src/extensions/default/PrefsCodeHints/unittests.js on lines 411..428

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

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

            it("should hint at the end of a key", function () {
                var hintList;

                // Between "language and "
                testEditor.setCursorPos({line: 9, ch: 13});
Severity: Major
Found in src/extensions/default/PrefsCodeHints/unittests.js and 7 other locations - About 6 hrs to fix
src/extensions/default/PrefsCodeHints/unittests.js on lines 195..212
src/extensions/default/PrefsCodeHints/unittests.js on lines 213..230
src/extensions/default/PrefsCodeHints/unittests.js on lines 326..343
src/extensions/default/PrefsCodeHints/unittests.js on lines 344..361
src/extensions/default/PrefsCodeHints/unittests.js on lines 375..392
src/extensions/default/PrefsCodeHints/unittests.js on lines 393..410
src/extensions/default/PrefsCodeHints/unittests.js on lines 411..428

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

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

            it("should hint at the end of the value", function () {
                var hintList;

                // After "closeBrackets": true
                testEditor.setCursorPos({line: 1, ch: 25});
Severity: Major
Found in src/extensions/default/PrefsCodeHints/unittests.js and 7 other locations - About 6 hrs to fix
src/extensions/default/PrefsCodeHints/unittests.js on lines 195..212
src/extensions/default/PrefsCodeHints/unittests.js on lines 213..230
src/extensions/default/PrefsCodeHints/unittests.js on lines 231..248
src/extensions/default/PrefsCodeHints/unittests.js on lines 326..343
src/extensions/default/PrefsCodeHints/unittests.js on lines 344..361
src/extensions/default/PrefsCodeHints/unittests.js on lines 375..392
src/extensions/default/PrefsCodeHints/unittests.js on lines 393..410

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

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

            it("should hint after after a space followed by a colon", function () {
                var hintList;

                // After "closeBrackets":+space
                testEditor.setCursorPos({line: 1, ch: 21});
Severity: Major
Found in src/extensions/default/PrefsCodeHints/unittests.js and 7 other locations - About 6 hrs to fix
src/extensions/default/PrefsCodeHints/unittests.js on lines 195..212
src/extensions/default/PrefsCodeHints/unittests.js on lines 213..230
src/extensions/default/PrefsCodeHints/unittests.js on lines 231..248
src/extensions/default/PrefsCodeHints/unittests.js on lines 326..343
src/extensions/default/PrefsCodeHints/unittests.js on lines 375..392
src/extensions/default/PrefsCodeHints/unittests.js on lines 393..410
src/extensions/default/PrefsCodeHints/unittests.js on lines 411..428

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

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

            it("should hint at the beginning of value", function () {
                var hintList;

                // After "closeBrackets": t
                testEditor.setCursorPos({line: 1, ch: 22});
Severity: Major
Found in src/extensions/default/PrefsCodeHints/unittests.js and 7 other locations - About 6 hrs to fix
src/extensions/default/PrefsCodeHints/unittests.js on lines 195..212
src/extensions/default/PrefsCodeHints/unittests.js on lines 213..230
src/extensions/default/PrefsCodeHints/unittests.js on lines 231..248
src/extensions/default/PrefsCodeHints/unittests.js on lines 326..343
src/extensions/default/PrefsCodeHints/unittests.js on lines 344..361
src/extensions/default/PrefsCodeHints/unittests.js on lines 393..410
src/extensions/default/PrefsCodeHints/unittests.js on lines 411..428

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

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

    width: function() {
        var scrollWidth,
            offsetWidth;
        // handle IE
        if ( $.browser.msie ) {
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/jquery.ui.dialog.js on lines 768..791

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

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

        if ( !transport ) {
            done( -1, "No Transport" );
        } else {
            jqXHR.readyState = 1;

Severity: Major
Found in src/thirdparty/jquery-2.1.3.js and 1 other location - About 6 hrs to fix
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/jquery-1.7.2.js on lines 7702..7729

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

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

            it("should hint at the center of value", function () {
                var hintList;

                // After "closeBrackets": tru
                testEditor.setCursorPos({line: 1, ch: 24});
Severity: Major
Found in src/extensions/default/PrefsCodeHints/unittests.js and 7 other locations - About 6 hrs to fix
src/extensions/default/PrefsCodeHints/unittests.js on lines 195..212
src/extensions/default/PrefsCodeHints/unittests.js on lines 213..230
src/extensions/default/PrefsCodeHints/unittests.js on lines 231..248
src/extensions/default/PrefsCodeHints/unittests.js on lines 326..343
src/extensions/default/PrefsCodeHints/unittests.js on lines 344..361
src/extensions/default/PrefsCodeHints/unittests.js on lines 375..392
src/extensions/default/PrefsCodeHints/unittests.js on lines 411..428

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

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

            it("should hint after a colon", function () {
                var hintList;

                // After "closeBrackets":
                testEditor.setCursorPos({line: 1, ch: 20});
Severity: Major
Found in src/extensions/default/PrefsCodeHints/unittests.js and 7 other locations - About 6 hrs to fix
src/extensions/default/PrefsCodeHints/unittests.js on lines 195..212
src/extensions/default/PrefsCodeHints/unittests.js on lines 213..230
src/extensions/default/PrefsCodeHints/unittests.js on lines 231..248
src/extensions/default/PrefsCodeHints/unittests.js on lines 344..361
src/extensions/default/PrefsCodeHints/unittests.js on lines 375..392
src/extensions/default/PrefsCodeHints/unittests.js on lines 393..410
src/extensions/default/PrefsCodeHints/unittests.js on lines 411..428

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

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 jquery.ui.position.js has 437 lines of code (exceeds 250 allowed). Consider refactoring.
Open

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

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

        function _moveNext() {
            var $context, $next;
    
            $context = $currentContext || $("#mrof-container #mrof-list > li.highlight");
            if ($context.length > 0) {
    Severity: Major
    Found in src/extensions/default/NavigationAndHistory/main.js and 1 other location - About 6 hrs to fix
    src/extensions/default/NavigationAndHistory/main.js on lines 519..536

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

    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 _movePrev() {
            var $context, $prev;
    
            $context = $currentContext || $("#mrof-container #mrof-list > li.highlight");
            if ($context.length > 0) {
    Severity: Major
    Found in src/extensions/default/NavigationAndHistory/main.js and 1 other location - About 6 hrs to fix
    src/extensions/default/NavigationAndHistory/main.js on lines 479..496

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

    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 435 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/hr/strings.js - About 6 hrs to fix

      Function position has 161 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      $.fn.position = function( options ) {
          if ( !options || !options.of ) {
              return _position.apply( this, arguments );
          }
      
      

        File strings.js has 434 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/ru/strings.js - About 6 hrs to fix

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

              _getRelativeOffset: function() {
          
                  if(this.cssPosition == "relative") {
                      var p = this.element.position();
                      return {
          src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/jquery.ui.sortable.js on lines 825..837

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

          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

              _getRelativeOffset: function() {
          
                  if(this.cssPosition == "relative") {
                      var p = this.currentItem.position();
                      return {
          src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/jquery.ui.draggable.js on lines 331..343

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

          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 Session.js has 432 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/JSUtils/Session.js - About 6 hrs to fix

            File strings.js has 432 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/da/strings.js - About 6 hrs to fix

              File FindBar.js has 432 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/FindBar.js - About 6 hrs to fix
                Severity
                Category
                Status
                Source
                Language