bramp/js-sequence-diagrams

View on GitHub

Showing 14 of 25 total issues

File daniel_400.font.js has 910 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*!
 * The following copyright notice may not be removed under any circumstances.
 * 
 * Copyright:
 * Copyright (c) 2011 by Daniel Midgley. All rights reserved.
Severity: Major
Found in fonts/daniel/daniel_400.font.js - About 2 days to fix

    File daniel_black_900.font.js has 906 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*!
     * The following copyright notice may not be removed under any circumstances.
     * 
     * Copyright:
     * Copyright (c) 2011 by Daniel Midgley. All rights reserved.
    Severity: Major
    Found in fonts/daniel/daniel_black_900.font.js - About 2 days to fix

      File daniel_700.font.js has 878 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      /*!
       * The following copyright notice may not be removed under any circumstances.
       * 
       * Copyright:
       * Copyright (c) 2011 by Daniel Midgley. All rights reserved.
      Severity: Major
      Found in fonts/daniel/daniel_700.font.js - About 2 days to fix

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

          layout: function() {
            // Local copies
            var diagram = this.diagram;
            var font    = this.font_;
            var actors  = diagram.actors;
        Severity: Major
        Found in src/theme.js - About 4 hrs to fix

          File theme.js has 313 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          /** js sequence diagrams
           *  https://bramp.github.io/js-sequence-diagrams/
           *  (c) 2012-2017 Andrew Brampton (bramp.net)
           *  Simplified BSD license.
           */
          Severity: Minor
          Found in src/theme.js - About 3 hrs to fix

            Function drawLine has 6 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                    drawLine: function(x1, y1, x2, y2, linetype, arrowhead) {
            Severity: Minor
            Found in src/theme-raphael.js - About 45 mins to fix

              Function drawTextBox has 6 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                drawTextBox: function(box, text, margin, padding, font, align) {
              Severity: Minor
              Found in src/theme.js - About 45 mins to fix

                Function drawLine has 6 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    drawLine: function(x1, y1, x2, y2, linetype, arrowhead) {
                Severity: Minor
                Found in src/theme-raphael.js - About 45 mins to fix

                  Function drawLine has 6 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      drawLine: function(x1, y1, x2, y2, linetype, arrowhead) {
                  Severity: Minor
                  Found in src/theme-snap.js - About 45 mins to fix

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

                      layout: function() {
                        // Local copies
                        var diagram = this.diagram;
                        var font    = this.font_;
                        var actors  = diagram.actors;
                    Severity: Minor
                    Found in src/theme.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 drawLine has 6 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        drawLine: function(x1, y1, x2, y2, linetype, arrowhead) {
                    Severity: Minor
                    Found in src/theme-snap.js - About 45 mins to fix

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

                          drawText: function(x, y, text, font, align) {
                            text = this.cleanText(text);
                            font = font || {};
                            align = align || ALIGN_LEFT;
                      
                      
                      Severity: Minor
                      Found in src/theme-raphael.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 drawText has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          drawText: function(x, y, text, font, align) {
                      Severity: Minor
                      Found in src/theme-snap.js - About 35 mins to fix

                        Function drawText has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                            drawText: function(x, y, text, font, align) {
                        Severity: Minor
                        Found in src/theme-raphael.js - About 35 mins to fix
                          Severity
                          Category
                          Status
                          Source
                          Language