nemesiscodex/openfonacide

View on GitHub

Showing 970 of 970 total issues

Function display has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

          display: function() {
            var
              title = settings.name + ':',
              totalTime = 0
            ;
Severity: Minor
Found in static/components/dimmer.js - About 1 hr to fix

    Function display has 29 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

              display: function() {
                var
                  title = settings.name + ':',
                  totalTime = 0
                ;
    Severity: Minor
    Found in static/components/video.js - About 1 hr to fix

      Function setting has 29 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

            setting: function(setting, value, modules, modifyExisting) {
              modules = (typeof modules === 'string')
                ? (modules === 'all')
                  ? settings.modules
                  : [modules]
      Severity: Minor
      Found in static/components/site.js - About 1 hr to fix

        Function display has 29 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                  display: function() {
                    var
                      title = settings.name + ':',
                      totalTime = 0
                    ;
        Severity: Minor
        Found in static/components/shape.js - About 1 hr to fix

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

                  LineString: function (coordinates) {
                      for (var i = 0, len = coordinates.length; i < len; i++) {
                          this.makePoint(coordinates[i]);
                      }
                  },
          Severity: Major
          Found in static/js/dncp/util/projection/normal.js and 4 other locations - About 1 hr to fix
          static/js/dncp/util/projection/normal.js on lines 150..154
          static/js/dncp/util/projection/normal.js on lines 155..159
          static/js/dncp/util/projection/normal.js on lines 160..164
          static/js/dncp/util/projection/normal.js on lines 165..169

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

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

                  MultiPoint: function (coordinates) {
                      for (var i = 0, len = coordinates.length; i < len; i++) {
                          this.Point(coordinates[i]);
                      }
                  },
          Severity: Major
          Found in static/js/dncp/util/projection/normal.js and 4 other locations - About 1 hr to fix
          static/js/dncp/util/projection/normal.js on lines 145..149
          static/js/dncp/util/projection/normal.js on lines 150..154
          static/js/dncp/util/projection/normal.js on lines 160..164
          static/js/dncp/util/projection/normal.js on lines 165..169

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

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

                  Polygon: function (coordinates) {
                      for (var i = 0, len = coordinates.length; i < len; i++) {
                          this.LineString(coordinates[i]);
                      }
                  },
          Severity: Major
          Found in static/js/dncp/util/projection/normal.js and 4 other locations - About 1 hr to fix
          static/js/dncp/util/projection/normal.js on lines 145..149
          static/js/dncp/util/projection/normal.js on lines 155..159
          static/js/dncp/util/projection/normal.js on lines 160..164
          static/js/dncp/util/projection/normal.js on lines 165..169

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

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

                  MultiLineString: function (coordinates) {
                      for (var i = 0, len = coordinates.length; i < len; i++) {
                          this.LineString(coordinates[i]);
                      }
                  },
          Severity: Major
          Found in static/js/dncp/util/projection/normal.js and 4 other locations - About 1 hr to fix
          static/js/dncp/util/projection/normal.js on lines 145..149
          static/js/dncp/util/projection/normal.js on lines 150..154
          static/js/dncp/util/projection/normal.js on lines 155..159
          static/js/dncp/util/projection/normal.js on lines 165..169

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

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

                      return ( $activeSide.next(selector.side).length > 0 )
                        ? $activeSide.next(selector.side)
                        : $module.find(selector.side).first()
          Severity: Major
          Found in static/components/shape.js and 2 other locations - About 1 hr to fix
          static/components/shape.js on lines 192..194
          static/components/shape.js on lines 225..227

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

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

                  MultiPolygon: function (coordinates) {
                      for (var i = 0, len = coordinates.length; i < len; i++) {
                          this.Polygon(coordinates[i]);
                      }
                  }
          Severity: Major
          Found in static/js/dncp/util/projection/normal.js and 4 other locations - About 1 hr to fix
          static/js/dncp/util/projection/normal.js on lines 145..149
          static/js/dncp/util/projection/normal.js on lines 150..154
          static/js/dncp/util/projection/normal.js on lines 155..159
          static/js/dncp/util/projection/normal.js on lines 160..164

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

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

                          : ( $activeSide.next(selector.side).length > 0 )
                            ? $activeSide.next(selector.side)
                            : $clone.find(selector.side).first(),
          Severity: Major
          Found in static/components/shape.js and 2 other locations - About 1 hr to fix
          static/components/shape.js on lines 192..194
          static/components/shape.js on lines 461..463

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

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

                      $nextSide   = ( $activeSide.next(selector.side).length > 0 )
                        ? $activeSide.next(selector.side)
                        : $module.find(selector.side).first()
          Severity: Major
          Found in static/components/shape.js and 2 other locations - About 1 hr to fix
          static/components/shape.js on lines 225..227
          static/components/shape.js on lines 461..463

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

          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

                  show: function(callback) {
                    callback = $.isFunction(callback)
                      ? callback
                      : function(){}
                    ;
          Severity: Major
          Found in static/components/modal.js and 1 other location - About 1 hr to fix
          static/components/modal.js on lines 282..289

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

          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

                  albers.translate = function (x) {
                      if (!arguments.length) {
                          return translate;
                      }
                      translate = [+x[0], +x[1]];
          Severity: Major
          Found in static/js/dncp/util/projection/albers.js and 1 other location - About 1 hr to fix
          static/js/dncp/util/projection/mercator.js on lines 44..50

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

          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

                  hide: function(callback) {
                    callback = $.isFunction(callback)
                      ? callback
                      : function(){}
                    ;
          Severity: Major
          Found in static/components/modal.js and 1 other location - About 1 hr to fix
          static/components/modal.js on lines 273..280

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

          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

                  mercator.translate = function (x) {
                      if (!arguments.length) {
                          return translate;
                      }
                      translate = [+x[0], +x[1]];
          Severity: Major
          Found in static/js/dncp/util/projection/mercator.js and 1 other location - About 1 hr to fix
          static/js/dncp/util/projection/albers.js on lines 83..89

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

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

              function format(formatter, value) {
                  if (formatter == 'week' 
                      || formatter == 'month' 
                      || formatter == 'quarter' 
                      || formatter == 'half-year'
          Severity: Minor
          Found in static/js/dncp/util/date.js - About 1 hr to fix

            Function look4sections has 28 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function look4sections(expMin, expMax) {
                var section;
                var tmpStep, tmpMin, tmpMax;
                var reference   = [];
                for (var i      = custSecs.length; i--;) {              // 逐步减小段数,步长就会渐大
            Severity: Minor
            Found in static/js/dncp/util/smartSteps.js - About 1 hr to fix

              Function coreCalc has 28 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function coreCalc(min, max, section) {
                  var step;
                  var secs    = section || +custSecs.slice(-1);
                  var expStep = getCeil((max - min) / secs, custSteps);   // 这是可能的最小步长,以它的量级作为后续计算的基准量级,以保证整数计算特性
                  var expSpan = expNum(max - min);                        // 2 位精度的最值跨度,过高的精度意味着有效数位更多
              Severity: Minor
              Found in static/js/dncp/util/smartSteps.js - About 1 hr to fix

                Function decode has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    function decode(json) {
                        if (!json.UTF8Encoding) {
                            return json;
                        }
                        var features = json.features;
                Severity: Minor
                Found in static/js/dncp/util/mapData/params.js - About 1 hr to fix
                  Severity
                  Category
                  Status
                  Source
                  Language