bbc/flashheart

View on GitHub

Showing 28 of 73 total issues

Function publish has 200 lines of code (exceeds 25 allowed). Consider refactoring.
Open

exports.publish = function(taffyData, opts, tutorials) {
    var docdash = env && env.conf && env.conf.docdash || {};
    data = taffyData;

    var conf = env.conf.templates || {};
Severity: Major
Found in docconfig/template/publish.js - About 1 day to fix

    File probe.js has 489 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    "use strict";
    /**
     @fileOverview Queries objects in memory using a mongo-like notation for reaching into objects and filtering for records
    
     @module documents/probe
    Severity: Minor
    Found in docconfig/template/fixtures/documents/probe.js - About 7 hrs to fix

      File publish.js has 487 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      /*global env: true */
      'use strict';
      
      var doop = require('jsdoc/util/doop');
      var fs = require('jsdoc/fs');
      Severity: Minor
      Found in docconfig/template/publish.js - About 7 hrs to fix

        Function pushin has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring.
        Open

        function pushin( path, record, setter, newValue ) {
            var context = record;
            var parent = record;
            var lastPart = null;
            var _i;
        Severity: Minor
        Found in docconfig/template/fixtures/documents/probe.js - About 5 hrs 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 bind has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
        Open

        exports.bind = function ( path, record, options ) {
            options = sys.extend( {}, dataBinderOptions, options );
            var context = record;
            var lastParent = context;
            var parts = path.split( probe.delimiter );
        Severity: Minor
        Found in docconfig/template/fixtures/documents/binder.js - About 4 hrs 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 bind has 78 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        exports.bind = function ( path, record, options ) {
            options = sys.extend( {}, dataBinderOptions, options );
            var context = record;
            var lastParent = context;
            var parts = path.split( probe.delimiter );
        Severity: Major
        Found in docconfig/template/fixtures/documents/binder.js - About 3 hrs to fix

          Function constructor has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
          Open

              constructor : function () {
                  /**
                   * The schema that defines the validation rules. This should probably be defined at the prototype for each
                   * object or model classification. It can be an anonymous schema defined right here, or this can be
                   * registered schema names to use, or just a single name
          Severity: Minor
          Found in docconfig/template/fixtures/documents/schema.js - About 2 hrs 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 pushin has 70 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function pushin( path, record, setter, newValue ) {
              var context = record;
              var parent = record;
              var lastPart = null;
              var _i;
          Severity: Major
          Found in docconfig/template/fixtures/documents/probe.js - About 2 hrs to fix

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

                function setUpBindings( mountPoint, mountName ) {
                    mountPoint["__" + mountName + "__"] = mountPoint[mountName];
                    Object.defineProperty( mountPoint, mountName, {
                        get : function () {
                            if ( sys.isFunction( options.getter ) ) {
            Severity: Major
            Found in docconfig/template/fixtures/documents/binder.js - About 2 hrs to fix

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

                  constructor : function () {
                      /**
                       * The schema that defines the validation rules. This should probably be defined at the prototype for each
                       * object or model classification. It can be an anonymous schema defined right here, or this can be
                       * registered schema names to use, or just a single name
              Severity: Major
              Found in docconfig/template/fixtures/documents/schema.js - About 2 hrs to fix

                Function constructor has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    constructor : function () {
                        var that = this;
                        probe.mixin( this );
                
                        var idField = "_id";
                Severity: Minor
                Found in docconfig/template/fixtures/documents/model.js - About 1 hr to fix

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

                  exports.publish = function(taffyData, opts, tutorials) {
                      var docdash = env && env.conf && env.conf.docdash || {};
                      data = taffyData;
                  
                      var conf = env.conf.templates || {};
                  Severity: Minor
                  Found in docconfig/template/publish.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 buildMemberNav has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function buildMemberNav(items, itemHeading, itemsSeen, linktoFn) {
                      var nav = '';
                  
                      if (items && items.length) {
                          var itemsNav = '';
                  Severity: Minor
                  Found in docconfig/template/publish.js - About 1 hr to fix

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

                        defaultDoc  : function ( schemaName ) {
                            if ( sys.isEmpty( schemaName ) ) {
                                schemaName = this._defaultSchemaName;
                            }
                            var newdoc = {};
                    Severity: Minor
                    Found in docconfig/template/fixtures/documents/schema.js - About 1 hr to fix

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

                                  set : function ( val ) {
                                      async.waterfall( [
                                          function ( done ) {
                                              if ( sys.isFunction( options.validator ) ) {
                                                  if ( options.validatorAsync ) {
                      Severity: Minor
                      Found in docconfig/template/fixtures/documents/binder.js - About 1 hr to fix

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

                        function configureStatsEvents(params: StatsEventsOpts): void {
                          const {
                            client,
                            namespace,
                            statName,
                        Severity: Minor
                        Found in src/httpTransport/configuration.ts - About 1 hr to fix

                          Function processExpressionObject has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          function processExpressionObject( val, key ) {
                              var operator;
                              if ( sys.isObject( val ) ) {
                                  var opKeys = Object.keys( val );
                                  var op = opKeys[ 0 ];
                          Severity: Minor
                          Found in docconfig/template/fixtures/documents/probe.js - About 1 hr to fix

                            Function buildNav has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            function buildNav(members) {
                                var nav = '<h2><a href="index.html">Home</a></h2>';
                                var seen = {};
                                var seenTutorials = {};
                            
                            
                            Severity: Minor
                            Found in docconfig/template/publish.js - About 1 hr to fix

                              Function constructor has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                constructor(client: RestClient, params: ClientParams) {
                                  const maxFailures = _.get(params, 'circuitbreaker.maxFailures', DEFAULT_MAX_FAILURES);
                                  const resetTimeout = _.get(params, 'circuitbreaker.resetTimeout', DEFAULT_RESET_TIMEOUT);
                              
                                  const opts = {
                              Severity: Minor
                              Found in src/circuitBreaker/circuitBreaker.ts - About 1 hr to fix

                                Function execQuery has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                function execQuery( obj, qu, shortCircuit, stopOnFirst ) {
                                    var arrayResults = [];
                                    var keyResults = [];
                                    sys.each( obj, function ( record, key ) {
                                        var expr, result, test, _i, _len;
                                Severity: Minor
                                Found in docconfig/template/fixtures/documents/probe.js - About 1 hr to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language