Showing 13 of 57 total issues

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

module.exports = function() {
  var sankey = {},
    nodeWidth = 24,
    nodePadding = 8,
    size = [1, 1],
Severity: Major
Found in src/extjs/sankeyfunctionality.js - About 1 day to fix

Function gameState has 157 lines of code (exceeds 25 allowed). Consider refactoring.
Open

var gameState = function($q, notificationService, $filter, UPGRADES, ACHIEVEMENTS, GainCalculator, localStorage, AnimatedFlyTip) {

  var getNewState = function() {
    return {
      upgrades: {},
Severity: Major
Found in src/js/gamestate.js - About 6 hrs to fix

Function gameController has 130 lines of code (exceeds 25 allowed). Consider refactoring.
Open

var gameController = function($scope, $window, $interval, $filter, $http, $modal, GameState, ChartConfigs, GameTimer, UpgradeManager, FunctionBuilder, UpgradePath, NgTableParams, ACHIEVEMENTS) {
  $scope.ACHIEVEMENTS = ACHIEVEMENTS;
  $scope._visibleUpgrades = [];
  $scope.groupVisibleHash = {};
  $scope.tabActive = [true, false, false, false];
Severity: Major
Found in src/js/gamecontroller.js - About 5 hrs to fix

Function chartConfigs has 98 lines of code (exceeds 25 allowed). Consider refactoring.
Open

var chartConfigs = function($q, GameState) {
  var defer = $q.defer();

  Highcharts.setOptions({
    global: {
Severity: Major
Found in src/js/chartconfigs.js - About 3 hrs to fix

Function sankey has 95 lines of code (exceeds 25 allowed). Consider refactoring.
Open

var sankey = function(UpgradePath) {
  return {
    restrict: 'E',
    scope: {},
    link: function(scope, element) {
Severity: Major
Found in src/js/sankey.js - About 3 hrs to fix

Function link has 89 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    link: function(scope, element) {

      const constants = {
        OPACITY_LOW: 0.2,
        OPACITY_HIGH: 0.6
Severity: Major
Found in src/js/sankey.js - About 3 hrs to fix

Function computeNodeDepths has 82 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  function computeNodeDepths(iterations) {
    var nodesByBreadth = d3.nest()
      .key(function(d) { return d.x; })
      .sortKeys(d3.ascending)
      .entries(nodes)
Severity: Major
Found in src/extjs/sankeyfunctionality.js - About 3 hrs to fix

Function upgradeManager has 67 lines of code (exceeds 25 allowed). Consider refactoring.
Open

var upgradeManager = function(GameState, UPGRADES, favico) {

  var hasUpgrade = function(key, level = 0) {
    return GameState.upgrade.has(key, level);
  };
Severity: Major
Found in src/js/upgrademanager.js - About 2 hrs to fix

Function functionBuilder has 65 lines of code (exceeds 25 allowed). Consider refactoring.
Open

var functionBuilder = function(GameState, GainCalculator, $window) {
  return {
    build: function() {

      var upgrade = GameState.upgrade;
Severity: Major
Found in src/js/functionbuilder.js - About 2 hrs to fix

Function build has 61 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    build: function() {

      var upgrade = GameState.upgrade;

      var unitText = `${_.camelCase(GameState.currencySet.get())}s`;
Severity: Major
Found in src/js/functionbuilder.js - About 2 hrs to fix

Function gameController has 14 arguments (exceeds 4 allowed). Consider refactoring.
Open

var gameController = function($scope, $window, $interval, $filter, $http, $modal, GameState, ChartConfigs, GameTimer, UpgradeManager, FunctionBuilder, UpgradePath, NgTableParams, ACHIEVEMENTS) {
Severity: Major
Found in src/js/gamecontroller.js - About 1 hr to fix

Function gameState has 8 arguments (exceeds 4 allowed). Consider refactoring.
Open

var gameState = function($q, notificationService, $filter, UPGRADES, ACHIEVEMENTS, GainCalculator, localStorage, AnimatedFlyTip) {
Severity: Major
Found in src/js/gamestate.js - About 1 hr to fix

Function gameTimer has 7 arguments (exceeds 4 allowed). Consider refactoring.
Open

var gameTimer = function($q, $interval, $timeout, $window, GameState, AdManager, GainCalculator) {
Severity: Major
Found in src/js/gametimer.js - About 50 mins to fix
Severity
Category
Status
Source
Language