hnrysmth/global-thermonuclear-war

View on GitHub

Showing 120 of 120 total issues

File app.js has 3473 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/******/ (function(modules) { // webpackBootstrap
/******/     // The module cache
/******/     var installedModules = {};

/******/     // The require function
Severity: Major
Found in app.js - About 1 wk to fix

    Function Sizzle has 286 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

         */function(window){var i,support,Expr,getText,isXML,tokenize,compile,select,outermostContext,sortInput,hasDuplicate,// Local document vars
        setDocument,document,docElem,documentIsHTML,rbuggyQSA,rbuggyMatches,matches,contains,// Instance-specific data
        expando="sizzle"+1*new Date(),preferredDoc=window.document,dirruns=0,done=0,classCache=createCache(),tokenCache=createCache(),compilerCache=createCache(),sortOrder=function sortOrder(a,b){if(a===b){hasDuplicate=true;}return 0;},// Instance methods
        hasOwn={}.hasOwnProperty,arr=[],pop=arr.pop,push_native=arr.push,push=arr.push,slice=arr.slice,// Use a stripped-down indexOf as it's faster than native
        // https://jsperf.com/thor-indexof-vs-for/5
    Severity: Major
    Found in app.js - About 1 day to fix

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

              set: function set(models, options) {
                if (models == null) return;
      
                options = _.extend({}, setOptions, options);
                if (options.parse && !this._isModel(models)) {
      Severity: Major
      Found in app.js - About 3 hrs to fix

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

            ajax:function ajax(url,options){// If url is an object, simulate pre-1.5 signature
            if((typeof url==="undefined"?"undefined":_typeof(url))==="object"){options=url;url=undefined;}// Force options to be an object
            options=options||{};var transport,// URL without anti-cache param
            cacheURL,// Response headers
            responseHeadersString,responseHeaders,// timeout handle
        Severity: Major
        Found in app.js - About 3 hrs to fix

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

                initialize: function initialize(options) {
                  var mapOptions = {
                    center: new google.maps.LatLng(55.3617609, -3.4433238),
                    disableDefaultUI: true,
                    disableDoubleClickZoom: true,
          Severity: Major
          Found in app.js and 1 other location - About 3 hrs to fix
          _scripts/view/map.js on lines 5..17

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

          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

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

            initialize: function(options) {
              var mapOptions = {
                center: new google.maps.LatLng(55.3617609, -3.4433238),
                disableDefaultUI: true,
                disableDoubleClickZoom: true,
          Severity: Major
          Found in _scripts/view/map.js and 1 other location - About 3 hrs to fix

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

          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

          Identical blocks of code found in 3 locations. Consider refactoring.
          Open

              var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* WEBPACK VAR INJECTION */(function(module) {"use strict";var _typeof=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?function(obj){return typeof obj;}:function(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};/*!
          Severity: Major
          Found in app.js and 2 other locations - About 2 hrs to fix

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

          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

          Identical blocks of code found in 3 locations. Consider refactoring.
          Open

              var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
          Severity: Major
          Found in app.js and 2 other locations - About 2 hrs to fix
          app.js on lines 124..124

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

          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

          Identical blocks of code found in 3 locations. Consider refactoring.
          Open

              var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
          Severity: Major
          Found in app.js and 2 other locations - About 2 hrs to fix
          app.js on lines 124..124

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

          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

                  if (iteratee == null && obj != null) {
                    obj = isArrayLike(obj) ? obj : _.values(obj);
                    for (var i = 0, length = obj.length; i < length; i++) {
                      value = obj[i];
                      if (value < result) {
          Severity: Major
          Found in app.js and 1 other location - About 2 hrs to fix

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

          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

                  if (iteratee == null && obj != null) {
                    obj = isArrayLike(obj) ? obj : _.values(obj);
                    for (var i = 0, length = obj.length; i < length; i++) {
                      value = obj[i];
                      if (value > result) {
          Severity: Major
          Found in app.js and 1 other location - About 2 hrs to fix

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

          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

          Consider simplifying this complex logical expression.
          Open

              if(forward&&useCache){// Seek `elem` from a previously-cached index
              // ...in a gzip-friendly way
              node=parent;outerCache=node[expando]||(node[expando]={});// Support: IE <9 only
              // Defend against cloned attroperties (jQuery gh-1709)
              uniqueCache=outerCache[node.uniqueID]||(outerCache[node.uniqueID]={});cache=uniqueCache[type]||[];nodeIndex=cache[0]===dirruns&&cache[1];diff=nodeIndex&&cache[2];node=nodeIndex&&parent.childNodes[nodeIndex];while(node=++nodeIndex&&node&&node[dir]||(// Fallback to seeking `elem` from the start
          Severity: Critical
          Found in app.js - About 2 hrs to fix

            Function eq has 53 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                  var eq = function eq(a, b, aStack, bStack) {
                    // Identical objects are equal. `0 === -0`, but they aren't identical.
                    // See the [Harmony `egal` proposal](http://wiki.ecmascript.org/doku.php?id=harmony:egal).
                    if (a === b) return a !== 0 || 1 / a === 1 / b;
                    // A strict comparison is necessary because `null == undefined`.
            Severity: Major
            Found in app.js - About 2 hrs to fix

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

                      set: function set(key, val, options) {
                        if (key == null) return this;
              
                        // Handle both `"key", value` and `{key: value}` -style arguments.
                        var attrs;
              Severity: Minor
              Found in app.js - About 2 hrs to fix

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

                     */setDocument=Sizzle.setDocument=function(node){var hasCompare,subWindow,doc=node?node.ownerDocument||node:preferredDoc;// Return early if doc is invalid or already selected
                    if(doc===document||doc.nodeType!==9||!doc.documentElement){return document;}// Update global variables
                    document=doc;docElem=document.documentElement;documentIsHTML=!isXML(document);// Support: IE 9-11, Edge
                    // Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936)
                    if(preferredDoc!==document&&(subWindow=document.defaultView)&&subWindow.top!==subWindow){// Support: IE 11, Edge
                Severity: Minor
                Found in app.js - About 2 hrs to fix

                  Consider simplifying this complex logical expression.
                  Open

                      origCount=j=handlers.length;while(j--){handleObj=handlers[j];if((mappedTypes||origType===handleObj.origType)&&(!handler||handler.guid===handleObj.guid)&&(!tmp||tmp.test(handleObj.namespace))&&(!selector||selector===handleObj.selector||selector==="**"&&handleObj.selector)){handlers.splice(j,1);if(handleObj.selector){handlers.delegateCount--;}if(special.remove){special.remove.call(elem,handleObj);}}}// Remove generic event handler if we removed something and no more handlers exist
                  Severity: Critical
                  Found in app.js - About 2 hrs to fix

                    Function start has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            start: function start(options) {
                              if (History.started) throw new Error('Backbone.history has already been started');
                              History.started = true;
                    
                              // Figure out the initial configuration. Do we need an iframe?
                    Severity: Minor
                    Found in app.js - About 1 hr to fix

                      Function offApi has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                            var offApi = function offApi(events, name, callback, options) {
                              if (!events) return;
                      
                              var i = 0,
                                  listening;
                      Severity: Minor
                      Found in app.js - About 1 hr to fix

                        Function sync has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                              Backbone.sync = function (method, model, options) {
                                var type = methodMap[method];
                        
                                // Default options, unless specified.
                                _.defaults(options || (options = {}), {
                        Severity: Minor
                        Found in app.js - About 1 hr to fix

                          Function initialize has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            initialize: function(options) {
                              this.map = options.map;
                              this.info = options.info;
                              this.count = 0;
                          
                          
                          Severity: Minor
                          Found in _scripts/controller/multiplayer.js - About 1 hr to fix
                            Severity
                            Category
                            Status
                            Source
                            Language