bondden/esf-puml

View on GitHub

Showing 14 of 116 total issues

File index.js has 280 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
 * Created by root on 7/29/15.
 */
//todo: create tests for incorrect data abd error handling
'use strict';
Severity: Minor
Found in tst/index.js - About 2 hrs to fix

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

      constructor(){
    
        var H=this;
    
        this.pumlJar='bin/plantuml.jar';
    Severity: Major
    Found in src/index.es7.js - About 2 hrs to fix

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

        constructor() {
      
          var H = this;
      
          this.pumlJar = 'bin/plantuml.jar';
      Severity: Minor
      Found in index.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

      File index.es7.js has 252 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      /**
       * Created by Denis Bondarenko <bond.den@gmail.com> on 29.07.2015.
       */
      "use strict";
      
      
      Severity: Minor
      Found in src/index.es7.js - About 2 hrs to fix

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

          constructor() {
        
            var H = this;
        
            this.pumlJar = 'bin/plantuml.jar';
        Severity: Minor
        Found in index.js - About 2 hrs to fix

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

            renderStringToString(strIn) {
              let format = arguments.length <= 1 || arguments[1] === undefined ? 'svg' : arguments[1];
          
              var H = this;
              return new Promise((rs, rj) => {
          Severity: Minor
          Found in index.js - About 1 hr to fix

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

              renderStringToString(strIn,format='svg'){
                var H=this;
                return new Promise((rs,rj)=>{
            
                  let out='';
            Severity: Minor
            Found in src/index.es7.js - About 1 hr to fix

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

                stream() {
                  let format = arguments.length <= 0 || arguments[0] === undefined ? 'svg' : arguments[0];
                  let cwd = arguments.length <= 1 || arguments[1] === undefined ? null : arguments[1];
              
              
              
              Severity: Minor
              Found in index.js - About 1 hr to fix

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

                  cleanSvgFile(fileOut){
                    //var H=this;
                    return new Promise((rs,rj)=>{
                
                      fs.readFile(fileOut,'utf8',(e1,r1)=>{
                Severity: Minor
                Found in src/index.es7.js - About 1 hr to fix

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

                    stream(format='svg',cwd=null){
                  
                      var H=this;
                  
                      let pcs=exec(this._.createQryStm(format));
                  Severity: Minor
                  Found in src/index.es7.js - About 1 hr to fix

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

                      cleanSvgFile(fileOut) {
                        //var H=this;
                        return new Promise((rs, rj) => {
                    
                          fs.readFile(fileOut, 'utf8', (e1, r1) => {
                    Severity: Minor
                    Found in index.js - About 1 hr to fix

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

                        renderString(strIn, fileOut) {
                          let format = arguments.length <= 2 || arguments[2] === undefined ? 'svg' : arguments[2];
                      
                          var H = this;
                          return new Promise((rs, rj) => {
                      Severity: Minor
                      Found in index.js - About 1 hr to fix

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

                          renderFile(fileIn,dirOut,format='svg'){
                            var H=this;
                            return new Promise((rs,rj)=>{
                        
                              exec(
                        Severity: Minor
                        Found in src/index.es7.js - About 1 hr to fix

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

                            renderString(strIn,fileOut,format='svg'){
                              var H=this;
                              return new Promise((rs,rj)=>{
                          
                                let qry=H._.createQryStr(strIn,fileOut,format);
                          Severity: Minor
                          Found in src/index.es7.js - About 1 hr to fix
                            Severity
                            Category
                            Status
                            Source
                            Language