maestro-server/analytics-front

View on GitHub

Showing 34 of 4,910 total issues

Function keys has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  Object.keys = (function () {
    'use strict';
    var hasOwnProperty = Object.prototype.hasOwnProperty,
        hasDontEnumBug = !({toString: null}).propertyIsEnumerable('toString'),
        dontEnums = [
Severity: Minor
Found in docs/graph/vendor/polyfill.js - About 1 hr to fix

    Function DBRepository has 31 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    const DBRepository = (Entity, options = {}) => {
    
        const DB = Entity.dao;
    
        return {
    Severity: Minor
    Found in app/core/repositories/DBRepository.js - About 1 hr to fix

      Function Persistence has 30 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      const Persistence = (Entity, FactoryDBRepository = DFactoryDBRepository) => {
      
          const DBRepository = FactoryDBRepository(Entity);
      
          return {
      Severity: Minor
      Found in app/core/services/PersistenceServices.js - About 1 hr to fix

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

        const ApplicationAnalytics = (Entity, PersistenceServices = DPersistenceServices) => {
        
        
            return {
                create(req, res, next) {
        Severity: Minor
        Found in app/graph/applications/persistenceGraph.js - About 1 hr to fix

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

              function initDynamic() {
                  // Bootstrap popover
                  $('button[data-toggle="popover"]').popover().click(function(e) {
                      e.preventDefault();
                  });
          Severity: Minor
          Found in docs/graph/main.js - About 1 hr to fix

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

            function replacePath (path, keys) {
              var index = 0;
            
              function replace (_, escaped, prefix, key, capture, group, suffix, escape) {
                if (escaped) {
            Severity: Minor
            Found in docs/graph/vendor/path-to-regexp/index.js - About 1 hr to fix

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

              function pathToRegexp (path, keys, options) {
                keys = keys || [];
              
                if (!isArray(keys)) {
                  options = keys;
              Severity: Minor
              Found in docs/graph/vendor/path-to-regexp/index.js - About 1 hr to fix

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

                  function replace (_, escaped, prefix, key, capture, group, suffix, escape) {
                Severity: Major
                Found in docs/graph/vendor/path-to-regexp/index.js - About 1 hr to fix

                  Function validateFile has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                  Open

                  const validateFile = (file, opts) => {
                  
                      const defaultParams = {
                          maxsize: 1630240, //~1 mb,
                          minsize: 1024, // 1 kbs
                  Severity: Minor
                  Found in app/core/services/validator/uploadValid.js - About 45 mins 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 where has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                  Open

                  Query.prototype.where = function (key, value) {
                      // if object was passed instead of key-value pair
                      // iterate over that object and call .where(key, value)
                      if (_.isObject(key)) {
                          let conditions = key;
                  Severity: Minor
                  Found in app/core/repositories/daos/connector/query.js - About 45 mins 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 AppTooltip has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                  Open

                  function AppTooltip(app, clk=true) {
                      var tooltip = $('#app-tooltip');
                      var lock = null;
                  
                      var connectors = $('.svg-pan-zoom_viewport .conector_h');
                  Severity: Minor
                  Found in assets/js/libs/appTooltip.js - About 45 mins 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 find has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                  Open

                  Query.prototype.find = function (query, options) {
                      let Model = this.model;
                  
                      query = _.assign({}, this.query, query);
                  
                  
                  Severity: Minor
                  Found in app/core/repositories/daos/connector/query.js - About 35 mins 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 AppSVG has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                  function AppSVG(svg) {
                      this.app = null;
                      this.root = null;
                  
                      this.setupSVGObject = function() {
                  Severity: Minor
                  Found in assets/js/libs/appSVG.js - About 25 mins 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 exports has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                  module.exports = function () {
                      const passport = new Passport();
                  
                      const strategy = new Strategy(config.jwtSecret, function (payload, done) {
                  
                  
                  Severity: Minor
                  Found in app/graph/config/auth_conector_analytics.js - About 25 mins 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

                  Severity
                  Category
                  Status
                  Source
                  Language