cBioPortal/iViz

View on GitHub

Showing 156 of 1,095 total issues

Function DataManagerForIviz has 1548 lines of code (exceeds 25 allowed). Consider refactoring.
Open

window.DataManagerForIviz = (function($, _) {
  var content = {};

  // Clinical attributes will be transferred into table.
  var configs_;
Severity: Major
Found in app/scripts/model/dataProxy.js - About 1 wk to fix

    Function init has 1498 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      content.init = function(_portalUrl, _study_cases_map) {
        _study_cases_map = _study_cases_map || {};
        _.map(_study_cases_map, function(item) {
          if (_.isArray(item.samples)) {
            item.samples.sort();
    Severity: Major
    Found in app/scripts/model/dataProxy.js - About 1 wk to fix

      Function util has a Cognitive Complexity of 276 (exceeds 5 allowed). Consider refactoring.
      Open

      var util = (function(_, cbio) {
        return (function() {
          function tableDownload(fileType, content) {
            switch (fileType) {
              case 'tsv':
      Severity: Minor
      Found in app/scripts/controller/util.js - About 5 days to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      File dataProxy.js has 1551 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      'use strict';
      window.DataManagerForIviz = (function($, _) {
        var content = {};
      
        // Clinical attributes will be transferred into table.
      Severity: Major
      Found in app/scripts/model/dataProxy.js - About 4 days to fix

        Function iViz has 760 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        window.iViz = (function(_, $, cbio, QueryByGeneUtil, QueryByGeneTextArea) {
          var data_;
          var vm_;
          var tableData_ = [];
          var groupFiltersMap_ = {};
        Severity: Major
        Found in app/scripts/main.js - About 3 days to fix

          Function util has 723 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          var util = (function(_, cbio) {
            return (function() {
              function tableDownload(fileType, content) {
                switch (fileType) {
                  case 'tsv':
          Severity: Major
          Found in app/scripts/controller/util.js - About 3 days to fix

            Function BarChart has 487 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              iViz.view.component.BarChart = function() {
                var content = this;
            
                var chartInst_;// DC chart instance.
                var opts_ = {};// Chart configuration options
            Severity: Major
            Found in app/scripts/views/components/barChart/barChart.js - About 2 days to fix

              Function initialSetup has 472 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  var initialSetup = function() {
                    var _def = new $.Deferred();
                    var self = this;
                    var vueInstance = iViz.vue.manage.getInstance();
                    vueInstance.increaseStudyViewSummaryPagePBStatus();
              Severity: Major
              Found in app/scripts/model/dataProxy.js - About 2 days to fix

                Function DataManagerForIviz has a Cognitive Complexity of 112 (exceeds 5 allowed). Consider refactoring.
                Open

                window.DataManagerForIviz = (function($, _) {
                  var content = {};
                
                  // Clinical attributes will be transferred into table.
                  var configs_;
                Severity: Minor
                Found in app/scripts/model/dataProxy.js - About 2 days to fix

                Cognitive Complexity

                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                A method's cognitive complexity is based on a few simple rules:

                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                • Code is considered more complex for each "break in the linear flow of the code"
                • Code is considered more complex when "flow breaking structures are nested"

                Further reading

                Function PieChart has 421 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  iViz.view.component.PieChart = function(ndx, attributes, opts, cluster) {
                    var content = this;
                    var v = {};
                
                    v.chart = '';
                Severity: Major
                Found in app/scripts/views/components/pieChart/pieChart.js - About 2 days to fix

                  Function TableView has 408 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    iViz.view.component.TableView = function() {
                      var content = this;
                      var chartId_;
                      var data_ = [];
                      var type_ = '';
                  Severity: Major
                  Found in app/scripts/views/components/dataTable/tableView.js - About 2 days to fix

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

                    module.exports = function(grunt) {
                      // Time how long tasks take. Can help when optimizing build times
                      require('time-grunt')(grunt);
                    
                      // Automatically load required grunt tasks
                    Severity: Major
                    Found in Gruntfile.js - About 2 days to fix

                      Function manage has 382 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        iViz.vue.manage = (function() {
                          var vmInstance_;
                      
                          return {
                            init: function() {
                      Severity: Major
                      Found in app/scripts/vueCore.js - About 1 day to fix

                        Function init has 362 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                              init: function() {
                                vmInstance_ = new Vue({
                                  el: '#complete-screen',
                                  data: {
                                    groups: [],
                        Severity: Major
                        Found in app/scripts/vueCore.js - About 1 day to fix

                          File main.js has 767 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          'use strict';
                          window.iViz = (function(_, $, cbio, QueryByGeneUtil, QueryByGeneTextArea) {
                            var data_;
                            var vm_;
                            var tableData_ = [];
                          Severity: Major
                          Found in app/scripts/main.js - About 1 day to fix

                            File util.js has 731 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            'use strict';
                            var util = (function(_, cbio) {
                              return (function() {
                                function tableDownload(fileType, content) {
                                  switch (fileType) {
                            Severity: Major
                            Found in app/scripts/controller/util.js - About 1 day to fix

                              File barChart.js has 714 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              'use strict';
                              (function(iViz, dc, _, $, d3, cbio) {
                                // iViz pie chart component. It includes DC pie chart.
                                iViz.view.component.BarChart = function() {
                                  var content = this;
                              Severity: Major
                              Found in app/scripts/views/components/barChart/barChart.js - About 1 day to fix

                                Function iViz has a Cognitive Complexity of 79 (exceeds 5 allowed). Consider refactoring.
                                Open

                                window.iViz = (function(_, $, cbio, QueryByGeneUtil, QueryByGeneTextArea) {
                                  var data_;
                                  var vm_;
                                  var tableData_ = [];
                                  var groupFiltersMap_ = {};
                                Severity: Minor
                                Found in app/scripts/main.js - About 1 day to fix

                                Cognitive Complexity

                                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                A method's cognitive complexity is based on a few simple rules:

                                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                • Code is considered more complex for each "break in the linear flow of the code"
                                • Code is considered more complex when "flow breaking structures are nested"

                                Further reading

                                File tableView.js has 579 lines of code (exceeds 250 allowed). Consider refactoring.
                                Open

                                /**
                                 * Created by Karthik Kalletla on 6/20/16.
                                 */
                                'use strict';
                                (function(iViz, dc, _, React, ReactDOM, EnhancedFixedDataTableSpecial) {
                                Severity: Major
                                Found in app/scripts/views/components/dataTable/tableView.js - About 1 day to fix

                                  Function createQtip has 224 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                        createQtip: function() {
                                          var self_ = this;
                                          var previousSelection = {};
                                          $('.virtual-study').qtip(iViz.util.defaultQtipConfig(
                                            (self_.showSaveButton ? 'Save/' : '') + 'Share Virtual Study'));
                                  Severity: Major
                                  Found in app/scripts/views/components/virtualStudy/virtualStudy.js - About 1 day to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language