linguisticexplorer/Linguistic-Explorer

View on GitHub

Showing 417 of 417 total issues

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

/*!
 * jQuery JavaScript Library v1.7.1
 * http://jquery.com/
 *
 * Copyright 2011, John Resig
Severity: Major
Found in public/javascripts/jquery.js - About 2 wks to fix

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

    (function($, undefined) {
    
    /**
     * Unobtrusive scripting adapter for jQuery
     *
    Severity: Major
    Found in public/javascripts/jquery_ujs.js and 1 other location - About 2 wks to fix
    public/javascripts/rails.js on lines 1..373

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

    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($, undefined) {
    
    /**
    * Unobtrusive scripting adapter for jQuery
    *
    Severity: Major
    Found in public/javascripts/rails.js and 1 other location - About 2 wks to fix
    public/javascripts/jquery_ujs.js on lines 1..373

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

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

        function build() {
            var svg = { };
            
            svg.FRAMERATE = 30;
            svg.MAX_VIRTUAL_PIXELS = 30000;
    Severity: Major
    Found in public/javascripts/canvg.js - About 1 wk to fix

      Method validate! has a Cognitive Complexity of 304 (exceeds 5 allowed). Consider refactoring.
      Open

          def validate!
      
            reset = "\r\e[0K"
      
            @check_users = true
      Severity: Minor
      Found in lib/group_data/validator.rb - About 6 days to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      File canvg.js has 2164 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      /*
       * canvg.js - Javascript SVG parser and renderer on Canvas
       * MIT Licensed 
       * Gabe Lerner (gabelerner@gmail.com)
       * http://code.google.com/p/canvg/
      Severity: Major
      Found in public/javascripts/canvg.js - About 5 days to fix

        Function jQuery has 592 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        var jQuery = (function() {
        
        // Define a local copy of jQuery
        var jQuery = function( selector, context ) {
                // The jQuery object is actually just the init constructor 'enhanced'
        Severity: Major
        Found in public/javascripts/jquery.js - About 2 days to fix

          Function Gmaps4Rails has 475 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            this.Gmaps4Rails = (function() {
          
              function Gmaps4Rails() {
                this.map = null;
                this.serviceObject = null;
          Severity: Major
          Found in public/javascripts/gmaps4rails/gmaps4rails.base.js - About 2 days to fix

            Function path has 291 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    svg.Element.path = function(node) {
                        this.base = svg.Element.PathElementBase;
                        this.base(node);
                                
                        var d = this.attribute('d').value;
            Severity: Major
            Found in public/javascripts/canvg.js - About 1 day to fix

              Function Gmaps4RailsGoogle has 278 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                this.Gmaps4RailsGoogle = (function(_super) {
              
                  __extends(Gmaps4RailsGoogle, _super);
              
                  function Gmaps4RailsGoogle() {
              Severity: Major
              Found in public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js - About 1 day to fix

                Method validate! has 263 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    def validate!
                
                      reset = "\r\e[0K"
                
                      @check_users = true
                Severity: Major
                Found in lib/group_data/validator.rb - About 1 day to fix

                  Function RGBColor has 253 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function RGBColor(color_string)
                  {
                      this.ok = false;
                  
                      // strip any leading #
                  Severity: Major
                  Found in public/javascripts/rgbcolor.js - About 1 day to fix

                    Function ajax has 242 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        ajax: function( url, options ) {
                    
                            // If url is an object, simulate pre-1.5 signature
                            if ( typeof url === "object" ) {
                                options = url;
                    Severity: Major
                    Found in public/javascripts/jquery.js - About 1 day to fix

                      Method import! has a Cognitive Complexity of 61 (exceeds 5 allowed). Consider refactoring.
                      Open

                          def import!
                            # RubyProf.measure_mode = RubyProf::ALLOCATIONS
                            # RubyProf.start
                            reset = "\r\e[0K"
                      
                      
                      Severity: Minor
                      Found in lib/group_data/importer.rb - About 1 day to fix

                      Cognitive Complexity

                      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                      A method's cognitive complexity is based on a few simple rules:

                      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                      • Code is considered more complex for each "break in the linear flow of the code"
                      • Code is considered more complex when "flow breaking structures are nested"

                      Further reading

                      File gmaps4rails.base.js has 500 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      (function() {
                        var Gmaps;
                      
                        Gmaps = {};
                      
                      
                      Severity: Minor
                      Found in public/javascripts/gmaps4rails/gmaps4rails.base.js - About 1 day to fix

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

                                            case 'c':
                                                while (!pp.isCommandOrEnd()) {
                                                    var curr = pp.current;
                                                    var p1 = pp.getPoint();
                                                    var cntrl = pp.getAsControlPoint();
                        Severity: Major
                        Found in public/javascripts/canvg.js and 1 other location - About 7 hrs to fix
                        public/javascripts/canvg.js on lines 1296..1306

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

                        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

                                            case 's':
                                                while (!pp.isCommandOrEnd()) {
                                                    var curr = pp.current;
                                                    var p1 = pp.getReflectedControlPoint();
                                                    var cntrl = pp.getAsControlPoint();
                        Severity: Major
                        Found in public/javascripts/canvg.js and 1 other location - About 7 hrs to fix
                        public/javascripts/canvg.js on lines 1284..1294

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

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

                          this.Gmaps4RailsOpenlayers = (function(_super) {
                        
                            __extends(Gmaps4RailsOpenlayers, _super);
                        
                            function Gmaps4RailsOpenlayers() {
                        Severity: Major
                        Found in public/javascripts/gmaps4rails/gmaps4rails.openlayers.js - About 7 hrs to fix

                          Function Gmaps4RailsBing has 179 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            this.Gmaps4RailsBing = (function(_super) {
                          
                              __extends(Gmaps4RailsBing, _super);
                          
                              function Gmaps4RailsBing() {
                          Severity: Major
                          Found in public/javascripts/gmaps4rails/gmaps4rails.bing.js - About 7 hrs to fix

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

                                Gmaps4RailsGoogle.prototype.clusterize = function() {
                                  var marker, markers_array, _i, _len, _ref;
                                  if (this.markers_conf.do_clustering === true) {
                                    if (this.markerClusterer !== null) this.clearClusterer();
                                    markers_array = new Array;
                            Severity: Major
                            Found in public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js and 1 other location - About 7 hrs to fix
                            public/javascripts/gmaps4rails/gmaps4rails.openlayers.js on lines 155..167

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

                            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