plainblack/Lacuna-Web-Client

View on GitHub

Showing 509 of 1,320 total issues

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

    render : function() {
        return (
            <div>

                <div className="ui grid">
Severity: Minor
Found in app/js/components/window/sitterManager/currentSittersTab.jsx - About 1 hr to fix

    Function Failure has 30 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

                Failure : function(o, retry, fail) {
                    // session expired
                    if (o.error.code === 1006) {
                        Game.Reset();
                        Game.DoLogin(o.error);
    Severity: Minor
    Found in app/js/game.jsx - About 1 hr to fix

      Function exports has 30 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      module.exports = function(options) {
          var b = browserify(['./app/js/load.js'], {
              extensions : [
                  '.jsx'
              ],
      Severity: Minor
      Found in gulp-tasks/browserify.js - About 1 hr to fix

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

                Trade : function() {
                    var data = {
                        session_id: Game.GetSession(""),
                        building_id: this.building.id,
                        have: Lib.getSelectedOptionValue(Dom.get("transporterOneForOneHave")),
        Severity: Minor
        Found in app/js-yui/building/transporter.js - About 1 hr to fix

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

                  Repair : function(e) {
                      var btn = Event.getTarget(e);
                      btn.disabled = true;
                      require('js/actions/menu/loader').show();
                      Game.Services.Buildings.Generic.repair({session_id:Game.GetSession(),building_id:this.building.id}, {
          Severity: Minor
          Found in app/js-yui/building.js - About 1 hr to fix

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

                getDefaultData : function() {
                    return {
                        bodies : {
                            colonies    : [],
                            mystations  : [],
            Severity: Minor
            Found in app/js/stores/rpc/empire.js - About 1 hr to fix

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

                      DumpGetDisplay : function() {
                          var ul = document.createElement('ul'),
                              li = document.createElement('li'),
                              nLi = li.cloneNode(false);
                          nLi.innerHTML = 'Convert water into waste.';
              Severity: Minor
              Found in app/js-yui/building/waterStorage.js - About 1 hr to fix

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

                        addResourceOptions : function(selectElement, selected) {
                            for(r in Lib.ResourceTypes) {
                                if(Lib.ResourceTypes.hasOwnProperty(r)) {
                                    resource = Lib.ResourceTypes[r];
                                    if(Lang.isArray(resource)) {
                Severity: Minor
                Found in app/js-yui/building/tradeMinistry.js - About 1 hr to fix

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

                          InvitesAccept : function() {
                              if(confirm(['Are you sure you want to accept the alliance invite from ', this.Invite.name,'?'].join(''))) {
                                  this.Self.service.accept_invite({
                                      session_id:Game.GetSession(""),
                                      building_id:this.Self.building.id,
                  Severity: Minor
                  Found in app/js-yui/building/embassy.js - About 1 hr to fix

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

                            getOrbiting : function(e) {
                                if(e.newValue) {
                                    if(!this.shipsOrbiting) {
                                        require('js/actions/menu/loader').show();
                                        this.service.view_ships_orbiting({session_id:Game.GetSession(),building_id:this.building.id}, {
                    Severity: Minor
                    Found in app/js-yui/building/spacePort.js - About 1 hr to fix

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

                                  QuickDialog : function(config, afterRender, afterHide) {
                                      var container = document.createElement('div');
                                      if (config.id) {
                                          container.id = config.id;
                                          delete config.id;
                      Severity: Minor
                      Found in app/js/game.jsx - About 1 hr to fix

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

                                        var func = function(params, origOpts) {
                                            var retry = function() {
                                                var opts = { retry : 0 };
                                                YAHOO.lang.augmentObject(opts, origOpts, true);
                                                opts.retry++;
                        Severity: Minor
                        Found in app/js/game.jsx - About 1 hr to fix

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

                                  addTileData : function(oTiles, filterOutDeleted) {
                                      var startZoomLevel = 0,
                                          newTileCache = {};
                                      for(var tKey in oTiles) {
                                          if(oTiles.hasOwnProperty(tKey)){
                          Severity: Minor
                          Found in app/js-yui/mapper.js - About 1 hr to fix

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

                                    getAvailable : function(e) {
                                        if(e.newValue) {
                                            require('js/actions/menu/loader').show();
                                            var data = {session_id:Game.GetSession(),building_id:this.building.id,page_number:1},
                                                selVal = Lib.getSelectedOptionValue("tradeFilter");
                            Severity: Minor
                            Found in app/js-yui/building/transporter.js - About 1 hr to fix

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

                                      MineWithdraw : function() {
                                          if(confirm(['Are you sure you want to withdraw the trade asking for ', this.Trade.ask, ' essentia and offering ', this.Trade.offer.join(', '),'?'].join(''))) {
                                              require('js/actions/menu/loader').show();
                                              this.Self.service.withdraw_from_market({
                                                  session_id:Game.GetSession(""),
                              Severity: Minor
                              Found in app/js-yui/building/transporter.js - About 1 hr to fix

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

                                    _getSearchTab : function() {
                                      var tab = new YAHOO.widget.Tab({ label: "Search", content: [
                                        '<div id="archaeologySearchContainer">',
                                        '  <ul id="archaeologySearchForm">',
                                        '    <li>Search Ore:<select id="archaeologyOre"></select></li>',
                                Severity: Minor
                                Found in app/js-yui/building/archaeology.js - About 1 hr to fix

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

                                          _getTrainTab : function() {
                                              var spies = this.result.spies;
                                              this.trainTab = new YAHOO.widget.Tab({ label: "Train Spies", content: [
                                                  '<div class="yui-g">',
                                                  '    <div class="yui-u first">',
                                  Severity: Minor
                                  Found in app/js-yui/building/intelligence.js - About 1 hr to fix

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

                                            ShipNameSave : function(e) {
                                                Event.stopEvent(e);
                                                require('js/actions/menu/loader').show();
                                                var newName = this.Input.value;
                                    
                                    
                                    Severity: Minor
                                    Found in app/js-yui/building/spacePort.js - About 1 hr to fix

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

                                                          success : function(o){
                                                              this.rpcSuccess(o);
                                                              
                                                              for(var i=0; i<lis.length; i++) {
                                                                  if(lis[i].Object) {
                                      Severity: Minor
                                      Found in app/js-yui/building/tradeMinistry.js - About 1 hr to fix

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

                                                DumpGetDisplay : function() {
                                                    var ul = document.createElement('ul'),
                                                        li = document.createElement('li'),
                                                        nLi = li.cloneNode(false);
                                                    nLi.innerHTML = 'Convert energy into waste.';
                                        Severity: Minor
                                        Found in app/js-yui/building/energyReserve.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language