tbfe/generator-mis

View on GitHub

Showing 15 of 45 total issues

Function projectfiles has 228 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        projectfiles: function() {
            var fileBase = this._.underscored(this.mis.projectName);

            //生成bingo空文件夹但angular开发方案中无用
            this.mkdir('data');
Severity: Major
Found in app/index.js - About 1 day to fix

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

    'use strict';
    var yeoman = require('yeoman-generator');
    var chalk = require('chalk');
    var yosay = require('yosay');
    //for parsing and manipulate javascript code
    Severity: Minor
    Found in app/index.js - About 6 hrs to fix

      Function prompting has 118 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          prompting: function() {
              var done = this.async();
              //collect some info to setup the project
              var prompts = [{
                  type: 'input',
      Severity: Major
      Found in app/index.js - About 4 hrs to fix

        Function prompting has 52 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          prompting: function() {
            var done = this.async();
            var prompts = [];
            this.author = process.env.USER;
        
        
        Severity: Major
        Found in widget/index.js - About 2 hrs to fix

          Function prompting has 46 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              prompting: function() {
                  //processing only if there exist projects
                  if (this.existedProjects.length > 0) {
                      var done = this.async();
                      var prompts = [{
          Severity: Minor
          Found in view/index.js - About 1 hr to fix

            Function writing has 46 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              writing: function() {
                var fileBase = this._.underscored(this.name);
                var date = ((new Date()).getFullYear()) + '-' + ((new Date()).getMonth() + 1) + '-' + ((new Date()).getDate());
                var deployConfFile = this.expand(this.destinationPath('deploy-conf.js'));
                var modName = '';
            Severity: Minor
            Found in widget/index.js - About 1 hr to fix

              Function prompting has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
              Open

                  prompting: function() {
                      var done = this.async();
                      //collect some info to setup the project
                      var prompts = [{
                          type: 'input',
              Severity: Minor
              Found in app/index.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 projectfiles has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
              Open

                      projectfiles: function() {
                          var fileBase = this._.underscored(this.mis.projectName);
              
                          //生成bingo空文件夹但angular开发方案中无用
                          this.mkdir('data');
              Severity: Minor
              Found in app/index.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 prompting has 34 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  prompting: function() {
                      //processing only if there exist projects
                      var done = this.async();
                      var prompts = [{
                          type: 'input',
              Severity: Minor
              Found in template/index.js - About 1 hr to fix

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

                    writing: function() {
                
                        var fileBase = this._.underscored(this.templateName);
                
                        //control
                Severity: Minor
                Found in template/index.js - About 1 hr to fix

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

                      initializing: function() {
                          // Have Yeoman greet the user.
                          this.log(yosay(
                              chalk.yellow('TIEBA MIS GENERATOR ')
                          ));
                  Severity: Minor
                  Found in app/index.js - About 1 hr to fix

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

                        writing: function() {
                            if (this.existedProjects.length > 0) {
                                var projectFolder = this._.underscored(this.projectName);
                                var fileBase = this._.underscored(this.name);
                                //copy the view template
                    Severity: Minor
                    Found in view/index.js - About 1 hr to fix

                      Function prompting has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                      Open

                        prompting: function() {
                          var done = this.async();
                          var prompts = [];
                          this.author = process.env.USER;
                      
                      
                      Severity: Minor
                      Found in widget/index.js - About 55 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 prompting has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                      Open

                          prompting: function() {
                              //processing only if there exist projects
                              if (this.existedProjects.length > 0) {
                                  var done = this.async();
                                  var prompts = [{
                      Severity: Minor
                      Found in view/index.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 prompting has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                      Open

                          prompting: function() {
                              //processing only if there exist projects
                              var done = this.async();
                              var prompts = [{
                                  type: 'input',
                      Severity: Minor
                      Found in template/index.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