TOTVSTEC/cloudbridge-cli

View on GitHub

Showing 76 of 179 total issues

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

    run(cloudbridge, argv) {
        let forceClean = this.needClean(argv),
            task,
            promise,
            noADVPL = false;
Severity: Minor
Found in src/tasks/ionic/build-android.js - About 1 hr to fix

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

        run(cloudbridge, argv) {
            let forceClean = this.needClean(argv),
                task,
                promise,
                noADVPL = false;
    Severity: Minor
    Found in src/tasks/cordova/build-android.js - About 1 hr to fix

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

          update(platforms) {
              var _this = this,
                  projectData = this.project.data();
      
              if (platforms.length === 0) {
      Severity: Minor
      Found in src/tasks/default/platform-update.js - About 1 hr to fix

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

            static fetchWrapper(options) {
                var pack = new Package('cloudbridge-core-cordova');
        
                return Q()
                    .then(function() {
        Severity: Minor
        Found in src/tasks/cordova/start.js - About 1 hr to fix

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

          module.exports = function spawn(command, args, options) {
              var deferred = Q.defer();
              var child = child_process.spawn(command, args, options);
              var capturedOut = '';
              var capturedErr = '';
          Severity: Minor
          Found in src/utils/spawn.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 copyTemplate has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
          Open

          Utils.copyTemplate = function copyTemplate(origin, to, data, extensions) {
              var files = fs.readdirSync(origin);
          
              extensions = extensions || /\.(prw|js|ts|coffe|css|less|scss|html|md|json|xml|java)/;
          
          
          Severity: Minor
          Found in src/utils/utils.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 getWindowsEnvironmentInfo has 31 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          Info.getWindowsEnvironmentInfo = function getWindowsEnvironmentInfo() {
              // Windows version reference
              // http://en.wikipedia.org/wiki/Ver_%28command%29
              var version = os.release();
              var windowsVersion = null;
          Severity: Minor
          Found in src/utils/info.js - About 1 hr to fix

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

                static fetchWrapper(options) {
                    var pack = new Package('cloudbridge-core-ionic');
            
                    return Q()
                        .then(function() {
            Severity: Minor
            Found in src/tasks/ionic/start.js - About 1 hr to fix

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

                  run(cloudbridge, argv) {
                      var _this = this,
                          platforms = _this.getPlatforms(argv);
              
                      if (platforms.length === 0) {
              Severity: Minor
              Found in src/tasks/ionic/platform-add.js - About 1 hr to fix

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

                    static fetchWrapper(options) {
                        var pack = new Package('cloudbridge-core-advpl');
                
                        return Q()
                            .then(function() {
                Severity: Minor
                Found in src/tasks/default/start.js - About 1 hr to fix

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

                  Info.printInfo = function printInfo(info) {
                      logging.logger.info('\nYour system information:\n'.bold);
                  
                      if (info.gulp) {
                          logging.logger.info('Gulp version:', info.gulp);
                  Severity: Minor
                  Found in src/utils/info.js - About 1 hr to fix

                    Function run has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        run(cloudbridge, argv) {
                            var _this = this,
                                platforms = _this.getPlatforms(argv);
                    
                            if (platforms.length === 0) {
                    Severity: Minor
                    Found in src/tasks/default/platform-remove.js - About 1 hr to fix

                      Function fixProjectV1 has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          fixProjectV1() {
                              var project = this.project.data(),
                                  components = project.components || {},
                                  platform = project.platform || {};
                      
                      
                      Severity: Minor
                      Found in src/tasks/default/app-task.js - About 1 hr to fix

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

                            run(cloudbridge, argv) {
                                var project = this.project.data(),
                                    packagePath = path.join(this.projectDir, 'build', project.name + '-debug.apk'),
                                    opts = {
                                        replace: true
                        Severity: Minor
                        Found in src/tasks/default/run-android.js - About 1 hr to fix

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

                              run(cloudbridge, argv) {
                                  var _this = this,
                                      platforms = _this.getPlatforms(argv);
                          
                                  if (platforms.length === 0) {
                          Severity: Minor
                          Found in src/tasks/default/platform-add.js - About 1 hr to fix

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

                                fetch() {
                                    var _this = this,
                                        homeDir = process.env.HOME || process.env.USERPROFILE || process.env.HOMEPATH,
                                        packageDir = path.join(homeDir, '.cloudbridge', 'packages', this.group, this.name),
                                        url = 'https://github.com/' + this.group + '/' + this.name + '/archive/';
                            Severity: Minor
                            Found in src/utils/package.js - About 1 hr to fix

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

                                  save(packages, bowerResult) {
                                      var silent = this.options.silent,
                                          components = this.project.get('components') || {},
                                          bowerComponents = components.bower || {},
                                          originalData = this.objectify(packages),
                              Severity: Minor
                              Found in src/tasks/default/bower-add.js - About 1 hr to fix

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

                                    save(packages, bowerResult) {
                                        var components = this.project.get('components') || {},
                                            bowerComponents = components.bower || {},
                                            message = '';
                                
                                
                                Severity: Minor
                                Found in src/tasks/default/bower-remove.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 getBooleanOptionsForTask has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                                Open

                                Cli.getBooleanOptionsForTask = function getBooleanOptionsForTask(task) {
                                    var availableTaskOptions = task.options;
                                    var booleanOptions = [];
                                
                                    if (availableTaskOptions) {
                                Severity: Minor
                                Found in src/cli.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 fixProjectV1 has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                Open

                                    fixProjectV1() {
                                        var project = this.project.data(),
                                            components = project.components || {},
                                            platform = project.platform || {};
                                
                                
                                Severity: Minor
                                Found in src/tasks/default/app-task.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