katrotz/splitify

View on GitHub

Showing 32 of 98 total issues

File packageMocksSpec.js has 13174 lines of code (exceeds 250 allowed). Consider refactoring.
Open

// goal: read JSON metadata for packages and create the mocks
// DEPENDS ON GLOBAL OBJECT: 'ComponentMocker'

var packageMetadata = {
  "insecure": {},
Severity: Major
Found in tests/jasmine/server/unit/packageMocksSpec.js - About 1 mo to fix

    File package-stubs.js has 13154 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    // DEPENDS ON GLOBAL OBJECT: 'ComponentMocker'
    
    var packageMetadata = {
      "insecure": {},
      "base64": {
    Severity: Major
    Found in tests/jasmine/server/unit/package-stubs.js - About 1 mo to fix

      Function initJasmineJquery has 652 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      window.initJasmineJquery = _.once(function () {
      
        /*!
        Jasmine-jQuery: a set of jQuery helpers for Jasmine tests.
      
      

        File jasmine-jquery.js has 654 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        window.initJasmineJquery = _.once(function () {
        
          /*!
          Jasmine-jQuery: a set of jQuery helpers for Jasmine tests.
        
        

          File jasmine-jquery.js has 652 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          /*!
          Jasmine-jQuery: a set of jQuery helpers for Jasmine tests.
          
          Version 2.1.0
          
          
          Severity: Major
          Found in packages/meteor-jasmine/src/client/unit/assets/jasmine-jquery.js - About 1 day to fix

            Function initJasmineJquery has a Cognitive Complexity of 60 (exceeds 5 allowed). Consider refactoring.
            Open

            window.initJasmineJquery = _.once(function () {
            
              /*!
              Jasmine-jQuery: a set of jQuery helpers for Jasmine tests.
            
            

            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 VelocityTestReporter has 170 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              VelocityTestReporter = function VelocityTestReporter(options) {
                var self = this,
                  timer = options.timer || noopTimer,
                  ddpParentConnection = options.ddpParentConnection,
                  ancestors = [],
            Severity: Major
            Found in packages/meteor-jasmine/src/lib/VelocityTestReporter.js - About 6 hrs to fix

              Function executeSpecsUnitMode has 104 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                runTests: function executeSpecsUnitMode() {
                  Meteor.call('velocity/reports/reset', {framework: this.name})
              
                  if (this._getTestFilesCursor().count() === 0) {
                    this._reportCompleted()
              Severity: Major
              Found in packages/meteor-jasmine/src/server/unit/ServerUnitTestFramework.js - About 4 hrs to fix

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

                  function KarmaVelocityReporter(options) {
                
                    var ddpParentConnection = options.ddpParentConnection
                    var ancestors = []
                    var tc = options.tc
                Severity: Major
                Found in packages/meteor-jasmine/src/client/unit/assets/adapter.js - About 3 hrs to fix

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

                    getKarmaConfig: function () {
                      var files = [];
                      var proxies = {};
                  
                      this._addPreAppFiles(files, proxies)
                  Severity: Major
                  Found in packages/meteor-jasmine/src/client/unit/ClientUnitTestFramework.js - About 2 hrs to fix

                    Function specDone has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        this.specDone = function (specResult) {
                          var skipped = specResult.status === 'disabled' || specResult.status === 'pending';
                          var time = skipped ? 0 : new Date().getTime() - specResult.startTime
                    
                          var velocitySpecDone = function (callback) {
                    Severity: Major
                    Found in packages/meteor-jasmine/src/client/unit/assets/adapter.js - About 2 hrs to fix

                      Function formatMessage has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          function formatMessage(messages) {
                            var out = '';
                            var already = {};
                            var indent = '';
                      
                      
                      Severity: Major
                      Found in packages/meteor-jasmine/src/lib/VelocityTestReporter.js - About 2 hrs to fix

                        File ClientUnitTestFramework.js has 251 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        /* globals ClientUnitTestFramework: true, __meteor_runtime_config__: false */
                        
                        var path = Npm.require('path');
                        var fs = Npm.require('fs');
                        var mkdirp = Npm.require('mkdirp');
                        Severity: Minor
                        Found in packages/meteor-jasmine/src/client/unit/ClientUnitTestFramework.js - About 2 hrs to fix

                          Function getFiles has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                          Open

                          function getFiles(dir, matcher) {
                            var allFiles = []
                            var stat;
                          
                            try {
                          Severity: Minor
                          Found in packages/meteor-jasmine/src/server/lib/get-files.js - About 1 hr 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 executeSpecsUnitMode has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                          Open

                            runTests: function executeSpecsUnitMode() {
                              Meteor.call('velocity/reports/reset', {framework: this.name})
                          
                              if (this._getTestFilesCursor().count() === 0) {
                                this._reportCompleted()
                          Severity: Minor
                          Found in packages/meteor-jasmine/src/server/unit/ServerUnitTestFramework.js - About 1 hr 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 parse has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          parseStack.parse = function (err) {
                            var frames = err.stack.split('\n');
                          
                            frames.shift(); // at least the first line is the exception
                            var stop = false;
                          Severity: Minor
                          Found in packages/meteor-jasmine/src/lib/parseStack.js - About 1 hr to fix

                            Function _executeClientTests has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              _executeClientTests: function (ddpConnection) {
                                var self = this;
                            
                                window.ddpParentConnection = ddpConnection
                            
                            

                              Function saveTestResult has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  var saveTestResult = Meteor.bindEnvironment(function saveTestResult(test) {
                                    var result = {
                                      id: 'jasmine:' + self.mode + ' | ' + test.id,
                                      //async: test.async,
                                      framework: options.framework,
                              Severity: Minor
                              Found in packages/meteor-jasmine/src/lib/VelocityTestReporter.js - About 1 hr to fix

                                Function generateMocks has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  generateMocks: _.once(function () {
                                
                                    /*
                                     Package = {
                                     "meteor": {
                                Severity: Minor
                                Found in packages/meteor-jasmine/src/server/unit/mock-generator.js - About 1 hr to fix

                                  Function createMirrorIframe has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                    createMirrorIframe: function () {
                                      var self = this
                                      var iframeId = 'jasmine-mirror'
                                  
                                      var getMirrorUrl = function (mirrorInfo) {
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language