hummingbird-me/hummingbird

View on GitHub

Showing 419 of 859 total issues

Function next has 50 lines of code (exceeds 25 allowed). Consider refactoring.
Open

next:function () {
        if (this.done) {
            return this.EOF;
        }
        if (!this._input) this.done = true;
Severity: Minor
Found in app/assets/javascripts/old/handlebars-1.0.0.js - About 2 hrs to fix

    Function init has 49 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    Flipsnap.prototype.init = function(element, opts) {
      var self = this;
    
      // set element
      self.element = element;
    Severity: Minor
    Found in public/2014/assets/js/flipsnap.js - About 1 hr to fix

      Function init has 49 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      Flipsnap.prototype.init = function(element, opts) {
        var self = this;
      
        // set element
        self.element = element;
      Severity: Minor
      Found in public/2013/assets/js/flipsnap.js - About 1 hr to fix

        Function _setOption has 49 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            _setOption: function( key, value ) {
                /*jshint maxcomplexity:15*/
                var isDraggable, isResizable,
                    uiDialog = this.uiDialog;
        
        
        Severity: Minor
        Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js - About 1 hr to fix

          Function _setOption has 49 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              _setOption: function( key, value ) {
                  var i,
                      valsLength = 0;
          
                  if ( key === "range" && this.options.range === true ) {
          Severity: Minor
          Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js - About 1 hr to fix

            Function _toggle has 48 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                _toggle: function( event, eventData ) {
                    var that = this,
                        toShow = eventData.newPanel,
                        toHide = eventData.oldPanel;
            
            
            Severity: Minor
            Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js - About 1 hr to fix

              Function _mouseCapture has 48 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  _mouseCapture: function( event ) {
                      var position, normValue, distance, closestHandle, index, allowed, offset, mouseOverHandle,
                          that = this,
                          o = this.options;
              
              
              Severity: Minor
              Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js - About 1 hr to fix

                Function _animate has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    _animate: function( toShow, toHide, data ) {
                        var total, easing, duration,
                            that = this,
                            adjust = 0,
                            down = toShow.length &&
                Severity: Minor
                Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js - About 1 hr to fix

                  Function _determineDate has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      _determineDate: function(inst, date, defaultDate) {
                          var offsetNumeric = function(offset) {
                                  var date = new Date();
                                  date.setDate(date.getDate() + offset);
                                  return date;
                  Severity: Minor
                  Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js - About 1 hr to fix

                    Function formattedAirDates has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                    Open

                      formattedAirDates: function() {
                        var format, formattedFinishedAiring, formattedStartedAiring, result;
                    
                        if (this.get('startedAiring')) {
                          format = this.get('startedAiringDateKnown') ? "D MMM YYYY" : "MMM YYYY";
                    Severity: Minor
                    Found in frontend/app/models/anime.js - About 1 hr 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

                    Method as_json has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                    Open

                        def as_json
                          resource_fields = {}
                          linked = {}
                          json = {
                            title => resource_fields,
                    Severity: Minor
                    Found in app/serializers/api/v2/object_serialization_strategy.rb - About 1 hr 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

                    Function changes has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                    Open

                      changes: function() {
                        var html = [];
                        var objectChanges = this.get('model.objectChanges');
                        var code;
                    
                    
                    Severity: Minor
                    Found in frontend/app/controllers/edit-item.js - About 1 hr 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

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

                      def import!
                        en, jp = fetch_series(all: true), fetch_series(lang: 'ja') || {}
                        raise MissingDataError.new if en.nil? || en[:episode].blank?
                    
                        # Save the jp anime title.
                    Severity: Minor
                    Found in lib/the_tvdb_import.rb - About 1 hr 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

                    Function set has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        set: function(key, val, options) {
                          var attr, attrs, unset, changes, silent, changing, prev, current;
                          if (key == null) return this;
                    
                          // Handle both `"key", value` and `{key: value}` -style arguments.
                    Severity: Minor
                    Found in app/assets/javascripts/old/backbone-1.0.0.js - About 1 hr to fix

                      Function resize has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          resize: function() {
                              var that = $(this).data("ui-resizable"),
                                  o = that.options,
                                  cs = that.size,
                                  os = that.originalSize,
                      Severity: Minor
                      Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js - About 1 hr to fix

                        Function _generatePosition has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            _generatePosition: function(event) {
                        
                                var top, left,
                                    o = this.options,
                                    pageX = event.pageX,
                        Severity: Minor
                        Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js - About 1 hr to fix

                          Method from_action has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            def self.from_action(data)
                              user = User.find data[:user_id]
                          
                              if data[:action_type] == "followed"
                                followed_user = User.find data[:followed_id]
                          Severity: Minor
                          Found in app/models/substory.rb - About 1 hr to fix

                            Function set has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                set: function(models, options) {
                                  options = _.defaults(options || {}, setOptions);
                                  if (options.parse) models = this.parse(models, options);
                                  if (!_.isArray(models)) models = models ? [models] : [];
                                  var i, l, model, attrs, existing, sort;
                            Severity: Minor
                            Found in app/assets/javascripts/old/backbone-1.0.0.js - About 1 hr to fix

                              Function getParseRegexForToken has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  function getParseRegexForToken(token) {
                                      switch (token) {
                                      case 'DDDD':
                                          return parseTokenThreeDigits;
                                      case 'YYYY':
                              Severity: Minor
                              Found in app/assets/javascripts/old/moment.js - About 1 hr to fix

                                Function _tabKeydown has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    _tabKeydown: function( event ) {
                                        /*jshint maxcomplexity:15*/
                                        var focusedTab = $( this.document[0].activeElement ).closest( "li" ),
                                            selectedIndex = this.tabs.index( focusedTab ),
                                            goingForward = true;
                                Severity: Minor
                                Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js - About 1 hr to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language