TOTVSTEC/cloudbridge-cli

View on GitHub

Showing 76 of 179 total issues

Function setUpConsoleLoggingHelpers has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

Logging.setUpConsoleLoggingHelpers = function setUpConsoleLoggingHelpers() {
    colors.setTheme({
        silly: 'rainbow',
        input: 'grey',
        small: 'grey',
Severity: Minor
Found in src/utils/logging.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 run has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

Cli.run = function run(processArgv, processCwd) {
    this.cwd = processCwd || process.cwd();

    try {
        //First we parse out the args to use them.
Severity: Minor
Found in src/cli.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 checkRuntime has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

Info.checkRuntime = function checkRuntime() {
    var info = this.gatherInfo(),
        iosDeployInstalled = false,
        iosSimInstalled = false,
        nodeUpgrade = false,
Severity: Minor
Found in src/utils/info.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 run has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    run(cloudbridge, argv) {
        if (argv.list || argv.l) {
            var listTask = new StartListTask(this.options);

            return listTask.run(cloudbridge);
Severity: Minor
Found in src/tasks/default/start.js - About 1 hr to fix

    Function showPrompt has 38 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        showPrompt() {
            var longest = this.getLongests(),
                choices = [],
                bowerChoices,
                platformChoices,
    Severity: Minor
    Found in src/tasks/default/update.js - About 1 hr to fix

      Function spawn has 38 lines of code (exceeds 25 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

        Function run has 37 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/cordova/platform-remove.js - About 1 hr to fix

          Function run has 37 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-remove.js - About 1 hr to fix

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

                run(cloudbridge, argv) {
                    var appserver = new AppServer({
                        target: paths.get("APPSERVER", this.projectDir)
                    }),
                        smartclient = new SmartClient({
            Severity: Minor
            Found in src/tasks/default/run-windows.js - About 1 hr to fix

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

                  run(cloudbridge, argv) {
                      var appserver = new AppServer({
                          target: paths.get("APPSERVER", this.projectDir)
                      }),
                          smartclient = new SmartClient({
              Severity: Minor
              Found in src/tasks/default/run-osx.js - About 1 hr to fix

                Function startApp has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    static startApp(options) {
                        if (typeof options !== 'object' || typeof options === 'undefined') {
                            throw new Error('You cannot start an app without options');
                        }
                
                
                Severity: Minor
                Found in src/tasks/cordova/start.js - About 1 hr to fix

                  Function run has 36 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/cordova/platform-add.js - About 1 hr to fix

                    Function getTaskWithName has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                    Open

                    TASKS.getTaskWithName = function getTaskWithName(name) {
                        for (var i = 0; i < TASKS.length; i++) {
                            var t = TASKS[i];
                    
                            if (t.name === name) {
                    Severity: Minor
                    Found in src/tasks/task-list.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 run has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        run(cloudbridge, argv) {
                    
                            if (argv._.length < 2) {
                                return utils.fail('Invalid command', 'start');
                            }
                    Severity: Minor
                    Found in src/tasks/cordova/start.js - About 1 hr to fix

                      Function promptForOverwrite has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          static promptForOverwrite(targetPath, _argv) {
                              var deferred = Q.defer(),
                                  choiceOverwrite = {
                                      name: 'Overwrite',
                                      value: 0,
                      Severity: Minor
                      Found in src/tasks/cordova/start.js - About 1 hr to fix

                        Function promptForOverwrite has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            static promptForOverwrite(targetPath, _argv) {
                                var deferred = Q.defer(),
                                    choiceOverwrite = {
                                        name: 'Overwrite',
                                        value: 0,
                        Severity: Minor
                        Found in src/tasks/default/start.js - About 1 hr to fix

                          Function promptForOverwrite has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              static promptForOverwrite(targetPath, _argv) {
                                  var deferred = Q.defer(),
                                      choiceOverwrite = {
                                          name: 'Overwrite',
                                          value: 0,
                          Severity: Minor
                          Found in src/tasks/ionic/start.js - About 1 hr to fix

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

                                run(cloudbridge, argv) {
                            
                                    if (argv._.length < 2) {
                                        return utils.fail('Invalid command', 'start');
                                    }
                            Severity: Minor
                            Found in src/tasks/ionic/start.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/ionic/build-ios.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-ios.js - About 1 hr to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language