adobe/brackets

View on GitHub

Showing 3,294 of 3,294 total issues

File strings.js has 634 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: Major
Found in src/nls/cs/strings.js - About 1 day to fix

    File strings.js has 634 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: Major
    Found in src/nls/ko/strings.js - About 1 day to fix

      File FindInFiles.js has 633 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: Major
      Found in src/search/FindInFiles.js - About 1 day to fix

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

                    it("should insert filtered folder in HTML", function () {
                        var pos1    = { line: 23, ch: 11 },
                            pos2    = { line: 23, ch: 14 },
                            pos3    = { line: 23, ch: 31 };
        
        
        Severity: Major
        Found in src/extensions/default/UrlCodeHints/unittests.js and 3 other locations - About 1 day to fix
        src/extensions/default/UrlCodeHints/unittests.js on lines 681..703
        src/extensions/default/UrlCodeHints/unittests.js on lines 754..776
        src/extensions/default/UrlCodeHints/unittests.js on lines 778..800

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

        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 insert filtered folder in CSS", function () {
                        var pos1    = { line: 10, ch: 24 },
                            pos2    = { line: 10, ch: 27 },
                            pos3    = { line: 10, ch: 43 };
        
        
        Severity: Major
        Found in src/extensions/default/UrlCodeHints/unittests.js and 3 other locations - About 1 day to fix
        src/extensions/default/UrlCodeHints/unittests.js on lines 657..679
        src/extensions/default/UrlCodeHints/unittests.js on lines 681..703
        src/extensions/default/UrlCodeHints/unittests.js on lines 778..800

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

        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 replace filtered file in HTML", function () {
                        var pos1    = { line: 23, ch: 11 },
                            pos2    = { line: 23, ch: 14 },
                            pos3    = { line: 23, ch: 21 };
        
        
        Severity: Major
        Found in src/extensions/default/UrlCodeHints/unittests.js and 3 other locations - About 1 day to fix
        src/extensions/default/UrlCodeHints/unittests.js on lines 657..679
        src/extensions/default/UrlCodeHints/unittests.js on lines 754..776
        src/extensions/default/UrlCodeHints/unittests.js on lines 778..800

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

        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 replace filtered file in CSS", function () {
                        var pos1    = { line: 10, ch: 24 },
                            pos2    = { line: 10, ch: 27 },
                            pos3    = { line: 10, ch: 34 };
        
        
        Severity: Major
        Found in src/extensions/default/UrlCodeHints/unittests.js and 3 other locations - About 1 day to fix
        src/extensions/default/UrlCodeHints/unittests.js on lines 657..679
        src/extensions/default/UrlCodeHints/unittests.js on lines 681..703
        src/extensions/default/UrlCodeHints/unittests.js on lines 754..776

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

        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 ( data.collisionWidth > outerWidth ) {
                        // element is initially over the left side of within
                        if ( overLeft > 0 && overRight <= 0 ) {
                            newOverRight = position.left + overLeft + data.collisionWidth - outerWidth - withinOffset;
                            position.left += overLeft - newOverRight;
        src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/jquery.ui.position.js on lines 329..354

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

        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 ( data.collisionHeight > outerHeight ) {
                        // element is initially over the top of within
                        if ( overTop > 0 && overBottom <= 0 ) {
                            newOverBottom = position.top + overTop + data.collisionHeight - outerHeight - withinOffset;
                            position.top += overTop - newOverBottom;
        src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/jquery.ui.position.js on lines 292..317

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

        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 625 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: Major
        Found in src/nls/zh-tw/strings.js - About 1 day to fix

          File strings.js has 625 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: Major
          Found in src/nls/pt-br/strings.js - About 1 day to fix

            File strings.js has 619 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: Major
            Found in src/nls/es/strings.js - About 1 day to fix

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

                  for ( ; i < length; i++ ) {
                      // Only deal with non-null/undefined values
                      if ( (options = arguments[ i ]) != null ) {
                          // Extend the base object
                          for ( name in options ) {
              Severity: Major
              Found in src/thirdparty/jquery-2.1.3.js and 1 other location - About 1 day to fix
              src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/jquery-1.7.2.js on lines 350..382

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

              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

                  for ( ; i < length; i++ ) {
                      // Only deal with non-null/undefined values
                      if ( (options = arguments[ i ]) != null ) {
                          // Extend the base object
                          for ( name in options ) {
              src/thirdparty/jquery-2.1.3.js on lines 204..236

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

              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 FileTreeViewModel.js has 613 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: Major
              Found in src/project/FileTreeViewModel.js - About 1 day to fix

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

                            it("should collapse consecutive path separators when inserting folder in HTML", function () {
                                var pos1    = { line: 22, ch: 11 },
                                    pos2    = { line: 22, ch: 22 };
                
                                runs(function () {
                Severity: Major
                Found in src/extensions/default/UrlCodeHints/unittests.js and 1 other location - About 1 day to fix
                src/extensions/default/UrlCodeHints/unittests.js on lines 827..850

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

                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

                            it("should collapse consecutive path separators when inserting folder in CSS", function () {
                                var pos1    = { line: 9, ch: 15 },
                                    pos2    = { line: 9, ch: 26 };
                
                                runs(function () {
                Severity: Major
                Found in src/extensions/default/UrlCodeHints/unittests.js and 1 other location - About 1 day to fix
                src/extensions/default/UrlCodeHints/unittests.js on lines 802..825

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

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

                define(function main(require, exports, module) {
                    "use strict";
                
                    var DocumentManager     = require("document/DocumentManager"),
                        Commands            = require("command/Commands"),
                Severity: Major
                Found in src/LiveDevelopment/main.js - About 1 day to fix

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

                      function formatHints(hints, query) {
                          var hasColorSwatch = hints.some(function (token) {
                              return token.color;
                          });
                  
                  
                  Severity: Major
                  Found in src/extensions/default/SVGCodeHints/main.js and 1 other location - About 1 day to fix
                  src/extensions/default/CSSCodeHints/main.js on lines 193..223

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

                  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 formatHints(hints, query) {
                          var hasColorSwatch = hints.some(function (token) {
                              return token.color;
                          });
                  
                  
                  Severity: Major
                  Found in src/extensions/default/CSSCodeHints/main.js and 1 other location - About 1 day to fix
                  src/extensions/default/SVGCodeHints/main.js on lines 104..134

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

                  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