plainblack/Lacuna-Web-Client

View on GitHub

Showing 509 of 1,320 total issues

Function onSuccess has 59 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    loader.onSuccess = function(o) {

        // /////////////////////////////////////////////////////////////////////////////
        // WARNING: IF YOU CHANGE THE ORDER OF THESE, THINGS WILL NOT LOAD PROPERLY! //
        // /////////////////////////////////////////////////////////////////////////////
Severity: Major
Found in app/js/load.js - About 2 hrs to fix

    Function AvailablePopulate has 59 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            AvailablePopulate : function() {
                var details = Dom.get("tradeAvailableDetails");
                
                if(details) {
                    var trades = this.availableTrades.trades,
    Severity: Major
    Found in app/js-yui/building/tradeMinistry.js - About 2 hrs to fix

      Function AvailablePopulate has 59 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              AvailablePopulate : function() {
                  var details = Dom.get("tradeAvailableDetails");
                  
                  if(details) {
                      var trades = this.availableMercs.trades,
      Severity: Major
      Found in app/js-yui/building/mercenariesGuild.js - About 2 hrs to fix

        Function PopulateShipsIncomingTab has 59 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                PopulateShipsIncomingTab : function(panel) {
                    var ships = this.currentShips.incoming || [],
                        details = Dom.get(panel.isStarPanel ? "starDetailIncomingShips" : "planetDetailIncomingShips");
        
                    if(ships.length > 0) {
        Severity: Major
        Found in app/js-yui/mapStar.js - About 2 hrs to fix

          Consider simplifying this complex logical expression.
          Open

          if (typeof YAHOO.lacuna.MapPlanet == "undefined" || !YAHOO.lacuna.MapPlanet) {
          
          (function(){
              var Lang = YAHOO.lang,
                  Util = YAHOO.util,
          Severity: Critical
          Found in app/js-yui/mapPlanet.js - About 2 hrs to fix

            Consider simplifying this complex logical expression.
            Open

            if (typeof YAHOO.lacuna.Game === 'undefined' || !YAHOO.lacuna.Game) {
            
                (function() {
                    var Util = YAHOO.util;
                    var Lang = YAHOO.lang;
            Severity: Critical
            Found in app/js/game.jsx - About 2 hrs to fix

              Function getDefaultData has 58 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  getDefaultData : function() {
                      return {
                          id              : '',
                          name            : '',
                          image           : '',
              Severity: Major
              Found in app/js/stores/genericBuilding.js - About 2 hrs to fix

                Function PopulateFleetSendTab has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        PopulateFleetSendTab : function(target, ships) {
                            var details = Dom.get("sendFleetAvail"),
                                detailsParent = details.parentNode,
                                li = document.createElement("li");
                
                
                Severity: Major
                Found in app/js-yui/building/spacePort.js - About 2 hrs to fix

                  Function PrisonersPopulate has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          PrisonersPopulate : function() {
                              var details = Dom.get("prisonersDetails");
                              if(details) {
                                  var prisoners = this.prisoners,
                                      div = document.createElement("div"),
                  Severity: Major
                  Found in app/js-yui/building/security.js - About 2 hrs to fix

                    Function _getResourcesTab has 57 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            _getResourcesTab : function() {
                    
                                var food_items = '',
                                    foods      = Lib.ResourceTypes.food;
                    
                    
                    Severity: Major
                    Found in app/js-yui/building/planetaryCommand.js - About 2 hrs to fix

                      Function processMessages has 57 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              processMessages : function(results, is) {
                                  var list = this.list,
                                      messages = results.messages,
                                      li = document.createElement("li"),
                                      isTab = is || {};
                      Severity: Major
                      Found in app/js-yui/messaging.js - About 2 hrs to fix

                        Function render has 57 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            render : function() {
                                var items = [
                                    {
                                        title         : 'My Colonies',
                                        key           : 'colonies',
                        Severity: Major
                        Found in app/js/components/menu/rightSidebar.jsx - About 2 hrs to fix

                          Function _createImage has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  _createImage : function() {
                                      if(!this.imageHolder) {
                                          var image = this.domElement.appendChild(document.createElement('div'));
                                          Dom.setStyle(image, "width", this.tileSizeInPx + 'px');
                                          Dom.setStyle(image, "height", this.tileSizeInPx + 'px');
                          Severity: Major
                          Found in app/js-yui/mapper.js - About 2 hrs to fix

                            Function populateView has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                populateView : function() {
                                  var glyphs = this.glyphs,
                                    details = Dom.get("archaeologyGlyphDetails");
                                    
                                  if(details) {
                            Severity: Major
                            Found in app/js-yui/building/archaeology.js - About 2 hrs to fix

                              Function DetailsProcess has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                      DetailsProcess : function(oResults, url, x, y) {
                                          var building = oResults.building,
                                              panel = this.buildingDetails,
                                              currBuildingId = this.currentBuilding ? this.currentBuilding.building.id : undefined;
                                          if(panel.isVisible() && (currBuildingId != oResults.building.id)) {
                              Severity: Major
                              Found in app/js-yui/mapPlanet.js - About 2 hrs to fix

                                Function _getHtml has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                        _getHtml : function() {
                                            return [
                                            '    <div class="hd">Universe Stats</div>',
                                            '    <div class="bd">',
                                            '        <div id="statsTabs" class="yui-navset">',
                                Severity: Major
                                Found in app/js-yui/stats.js - About 2 hrs to fix

                                  Function DumpGetDisplay has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                          DumpGetDisplay : function() {
                                              var div = document.createElement("div"),
                                                  resources = [],
                                                  rKey;
                                  
                                  
                                  Severity: Major
                                  Found in app/js-yui/building/oreStorage.js - About 2 hrs to fix

                                    Function _getSendFleetTab has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                            _getSendFleetTab : function() {
                                                var currYear  = Lacuna.Game.ServerData.time.getUTCFullYear();
                                                var currMon   = Lacuna.Game.ServerData.time.getUTCMonth() + 1;
                                                var currDay   = Lacuna.Game.ServerData.time.getUTCDate();
                                                var currHour  = Lacuna.Game.ServerData.time.getUTCHours();
                                    Severity: Major
                                    Found in app/js-yui/building/spacePort.js - About 2 hrs to fix

                                      Function DumpGetDisplay has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                              DumpGetDisplay : function() {
                                                  var div = document.createElement("div"),
                                                      resources = [],
                                                      rKey;
                                      
                                      
                                      Severity: Major
                                      Found in app/js-yui/building/foodReserve.js - About 2 hrs to fix

                                        Function success has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                                        success:function(o){
                                                            require('js/actions/menu/loader').hide();
                                                            var profile = o.result.profile;
                                                            this.currentEmpire = profile;
                                                            this.empire.innerHTML = profile.name;
                                        Severity: Major
                                        Found in app/js-yui/info.js - About 2 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language