plainblack/Lacuna-Web-Client

View on GitHub

Showing 509 of 1,320 total issues

Function Push has 75 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        Push : function() {
            var data = {
                    session_id: Game.GetSession(""),
                    building_id: this.building.id,
                    target_id: Lib.getSelectedOptionValue(Dom.get("tradePushColony")),
Severity: Major
Found in app/js-yui/building/tradeMinistry.js - About 3 hrs to fix

    Consider simplifying this complex logical expression.
    Open

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

      Function TraditionalController has 74 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          Mapper.TraditionalController = function( map ) {
              this.map = map;
              this.dd = new YAHOO.util.DragDrop(map.mapDiv, 'mapper' );
              this.dd.subscribe("dragEvent", this.moveMap, this, true);
              this.dd.subscribe("startDragEvent", this.startDrag, this, true);
      Severity: Major
      Found in app/js-yui/mapper.js - About 2 hrs to fix

        Function AddTrade has 74 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                AddTrade : function() {
                    var qVal = Dom.get("tradeAddAskingQuantity").value*1;
                    if(!Lang.isNumber(qVal) || qVal <= 0) {
                        Dom.get("tradeAddMessage").innerHTML = "Quantity of asking essentia must be a number and greater than 0";
                        return;
        Severity: Major
        Found in app/js-yui/building/tradeMinistry.js - About 2 hrs to fix

          Function func has 73 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                      var func = function(oParams, opts) {
                          // Note: oParams = Object Parameters.
                          var smd = self._smd;
                          var baseUrl = self._baseUrl;
          
          
          Severity: Major
          Found in app/js-yui/rpc.js - About 2 hrs to fix

            Function ArchaeologyExcavators has 73 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

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

              Function LogsPopulate has 73 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      LogsPopulate : function() {
                          var details = Dom.get("battleLogsDetails");
              
                          if(details) {
                              var logs = this.battleLogs.battle_log,
              Severity: Major
              Found in app/js-yui/building/spacePort.js - About 2 hrs to fix

                Function SupplyChainList has 72 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        SupplyChainList : function() {
                          var supply_chains = this.supply_chains;
                          
                          if ( supply_chains.length == 0 ) {
                            Dom.setStyle("supplyChainList", "display", "none");
                Severity: Major
                Found in app/js-yui/building/tradeMinistry.js - About 2 hrs to fix

                  Function viewForgeMakePlan has 72 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          viewForgeMakePlan : function() {
                              var make_plan = this.result.tasks.make_plan,
                                  make_form = Dom.get("forgeMakePlanForm");
                              
                              if ( make_plan.length == 0 ) {
                  Severity: Major
                  Found in app/js-yui/building/theDillonForge.js - About 2 hrs to fix

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

                        render : function() {
                            return (
                                <div>
                                  <p>Dear player,</p>
                    
                    
                    Severity: Major
                    Found in app/js/components/window/survey.jsx - About 2 hrs to fix

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

                          render : function() {
                              var barClass = classNames('ui inverted compact small menu', {
                                  red  : this.state.empire.self_destruct_active,
                                  blue : !this.state.empire.self_destruct_active
                              });
                      Severity: Major
                      Found in app/js/components/menu/topBar.jsx - About 2 hrs to fix

                        Function populateProfile has 71 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                populateProfile : function(results) {
                                    var p = results.profile;
                                    this.description.value = p.description;
                                    this.status.value = p.status_message;
                                    this.email.value = p.email;
                        Severity: Major
                        Found in app/js-yui/profile.js - About 2 hrs to fix

                          Function AddTrade has 71 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  AddTrade : function() {
                                      var qVal = Dom.get("tradeAddAskingQuantity").value*1;
                                      if(!Lang.isNumber(qVal) || qVal <= 0) {
                                          Dom.get("tradeAddMessage").innerHTML = "Quantity of asking essentia must be a number and greater than 0";
                                          return;
                          Severity: Major
                          Found in app/js-yui/building/transporter.js - About 2 hrs to fix

                            Function OrbitingPopulate has 71 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    OrbitingPopulate : function() {
                                        var details = Dom.get("shipsOrbitingDetails");
                            
                                        if(details) {
                                            var ships = this.shipsOrbiting.ships,
                            Severity: Major
                            Found in app/js-yui/building/spacePort.js - About 2 hrs to fix

                              Function FleetSend has 71 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                      FleetSend : function(e) {
                                          var btn = Event.getTarget(e);
                                          btn.disabled = true;
                                          var oSelf = this.Self,
                                              ship = this.Ship,
                              Severity: Major
                              Found in app/js-yui/building/spacePort.js - About 2 hrs to fix

                                Function viewForgeSplitPlan has 71 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                        viewForgeSplitPlan : function() {
                                            var split_plan = this.result.tasks.split_plan,
                                                split_form = Dom.get("forgeSplitPlanForm");
                                            
                                            if ( split_plan.length == 0 ) {
                                Severity: Major
                                Found in app/js-yui/building/theDillonForge.js - About 2 hrs to fix

                                  Function Push has 70 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                          Push : function() {
                                              var data = {
                                                      session_id: Game.GetSession(""),
                                                      building_id: this.building.id,
                                                      target_id: Lib.getSelectedOptionValue(Dom.get("tradePushColony"))
                                  Severity: Major
                                  Found in app/js-yui/building/transporter.js - About 2 hrs to fix

                                    Function WasteChainShipsPopulate has 70 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                            WasteChainShipsPopulate : function() {
                                                var ships = this.waste_chain_ships,
                                                    no_ships = Dom.get("wasteChainShipsNone"),
                                                    details = Dom.get("wasteChainShipsDetails");
                                                
                                    Severity: Major
                                    Found in app/js-yui/building/tradeMinistry.js - About 2 hrs to fix

                                      Function _getQueueTab has 69 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                              _getQueueTab : function() {
                                                  var bq = this.result.build_queue,
                                                      ul = document.createElement("ul"),
                                                      li = document.createElement("li"),
                                                      div = document.createElement("div"),
                                      Severity: Major
                                      Found in app/js-yui/building/development.js - About 2 hrs to fix

                                        Function CreateEmpire has 68 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            var CreateEmpire = function(Login) {
                                                this.id = "createEmpire";
                                                this._login = Login;
                                                this.createEvent("onCreateSuccessful");
                                                
                                        Severity: Major
                                        Found in app/js-yui/createEmpire.js - About 2 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language