bondden/esf-puml

View on GitHub
src/index.es7.js

Summary

Maintainability
F
1 wk
Test Coverage

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

    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 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 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 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

                Identical blocks of code found in 2 locations. Consider refactoring.
                Open

                    return new Promise((rs,rj)=>{
                
                      let out='';
                      let qry=H._.createQryStm(format);
                      let pcs=exec(qry);
                Severity: Major
                Found in src/index.es7.js and 1 other location - About 1 day to fix
                index.js on lines 256..294

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 281.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                  cleanSvgFile(fileOut){
                    //var H=this;
                    return new Promise((rs,rj)=>{
                
                      fs.readFile(fileOut,'utf8',(e1,r1)=>{
                Severity: Major
                Found in src/index.es7.js and 1 other location - About 1 day to fix
                index.js on lines 135..174

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 228.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Identical blocks of code found in 2 locations. Consider refactoring.
                Open

                    return new Promise((rs,rj)=>{
                
                      let qry=H._.createQryStr(strIn,fileOut,format);
                      let pcs=exec(qry);
                
                
                Severity: Major
                Found in src/index.es7.js and 1 other location - About 1 day to fix
                index.js on lines 220..249

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 219.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Identical blocks of code found in 2 locations. Consider refactoring.
                Open

                      customCwd    :function(buf,cwd){
                
                        let s=buf.toString('utf8');
                
                        let rxs='!include ((((\.\/)?(\.\.\/)+)|(\.\/(\.\.\/)*))((.+)[\r\n]))';
                Severity: Major
                Found in src/index.es7.js and 1 other location - About 1 day to fix
                index.js on lines 50..72

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 203.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Identical blocks of code found in 2 locations. Consider refactoring.
                Open

                    return new Promise((rs,rj)=>{
                
                      exec(
                        H._.createQryFile(fileIn,dirOut,format),
                        {
                Severity: Major
                Found in src/index.es7.js and 1 other location - About 7 hrs to fix
                index.js on lines 187..213

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 192.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Identical blocks of code found in 2 locations. Consider refactoring.
                Open

                  renderDir(inpDir,outDir){
                    var H=this;
                    return new Promise((rs,rj)=>{
                
                      var t=setInterval(()=>{
                Severity: Major
                Found in src/index.es7.js and 1 other location - About 5 hrs to fix
                index.js on lines 113..133

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 140.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Identical blocks of code found in 2 locations. Consider refactoring.
                Open

                        return  'java -jar '+H.jarPth+' ' +
                                '-charset "utf8" ' +
                                H._.setFmt(fmt) +' '+
                                '-o "'+outDir+'" "'+path.resolve(inpDir+'/**.puml')+'"';
                Severity: Major
                Found in src/index.es7.js and 1 other location - About 1 hr to fix
                index.js on lines 78..78

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 71.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Identical blocks of code found in 2 locations. Consider refactoring.
                Open

                      write:function(d, encoding, next){
                
                        if(cwd){
                          d=H._.customCwd(d,cwd);
                        }
                Severity: Major
                Found in src/index.es7.js and 1 other location - About 1 hr to fix
                index.js on lines 316..325

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 67.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Identical blocks of code found in 2 locations. Consider refactoring.
                Open

                        return  'java -jar '+H.jarPth+' ' +
                                '-charset "utf8" ' +
                                H._.setFmt(fmt) +' '+
                                '-o "'+out+'" "'+inp+'"';
                Severity: Major
                Found in src/index.es7.js and 1 other location - About 1 hr to fix
                index.js on lines 85..85

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 59.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Identical blocks of code found in 2 locations. Consider refactoring.
                Open

                        return  'java -jar '+H.jarPth+' ' +
                                '-charset "utf8" ' +
                                H._.setFmt(fmt) +' '+
                                '-pipe > "'+outFile+'"';
                Severity: Minor
                Found in src/index.es7.js and 1 other location - About 50 mins to fix
                index.js on lines 92..92

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 51.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Parsing error: 'import' and 'export' may appear only with 'sourceType: module'
                Open

                export class PumlRenderer{
                Severity: Minor
                Found in src/index.es7.js by eslint

                For more information visit Source: http://eslint.org/docs/rules/

                There are no issues that match your filters.

                Category
                Status