Jellyvision/lateralus

View on GitHub

Showing 6 of 8 total issues

Function delegateLateralusEvents has 38 lines of code (exceeds 25 allowed). Consider refactoring.
Open

mixins.delegateLateralusEvents = function () {
  this.setupProviders();

  _.each({
      /**
Severity: Minor
Found in src/lateralus.mixins.js - About 1 hr to fix

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

    mixins.addComponent = function (Component, viewOptions, options) {
      options = options || {};
    
      // If this object belongs to a Lateralus.Component (such as a
      // Lateralus.Component.View or Lateralus.Component.Model), add the new
    Severity: Minor
    Found in src/lateralus.mixins.js - About 1 hr to fix

      Function addComponent has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

      mixins.addComponent = function (Component, viewOptions, options) {
        options = options || {};
      
        // If this object belongs to a Lateralus.Component (such as a
        // Lateralus.Component.View or Lateralus.Component.Model), add the new
      Severity: Minor
      Found in src/lateralus.mixins.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 Component has 31 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function Component (lateralus, options, viewOptions, opt_parentComponent) {
      
        /**
         * A reference to the central {@link Lateralus} instance.
         * @member Lateralus.Component#lateralus
      Severity: Minor
      Found in src/lateralus.component.js - About 1 hr to fix

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

        function Component (lateralus, options, viewOptions, opt_parentComponent) {
        
          /**
           * A reference to the central {@link Lateralus} instance.
           * @member Lateralus.Component#lateralus
        Severity: Minor
        Found in src/lateralus.component.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 dispose has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
        Open

        fn.dispose = function () {
          _(this).lateralusDispose(() => {
            if (this.view) {
              this.view.dispose();
            }
        Severity: Minor
        Found in src/lateralus.component.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

        Severity
        Category
        Status
        Source
        Language