Strider-CD/strider

View on GitHub

Showing 1,006 of 1,006 total issues

Avoid too many return statements within this function.
Open

        return {};
Severity: Major
Found in apps/strider/dist-lib/utils/index.js - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

      if ('object' !== typeof schema) return;
    Severity: Major
    Found in apps/strider/lib/utils/index.js - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

                  return;
      Severity: Major
      Found in apps/strider/dist-lib/utils/index.js - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

                return error(400, 'Invalid project type specified');
        Severity: Major
        Found in apps/strider/dist-lib/routes/api/repo.js - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                  return ret;
          Severity: Major
          Found in apps/strider/dist-lib/utils/index.js - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

              if (b.status === 'running') return 1;
            Severity: Major
            Found in apps/strider/lib/jobs.js - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                  if (val.enum) return val.enum[0];
              Severity: Major
              Found in apps/strider/lib/utils/index.js - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                    return defaultVal(val.type);
                Severity: Major
                Found in apps/strider/lib/utils/index.js - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                      return data(test, params, req, function(err, data) {
                        if (err) return res.send(`Failed to load data: ${err.message}`);
                        send(data);
                      });
                  Severity: Major
                  Found in apps/strider/lib/views-test.js - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                        return error(400, 'Invalid project type specified');
                    Severity: Major
                    Found in apps/strider/lib/routes/api/repo.js - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                            return error(400, 'provider.repo_id is required');
                      Severity: Major
                      Found in apps/strider/lib/routes/api/repo.js - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                            return error(
                              400,
                              'Project type specified is not available; one or more required plugins is not installed'
                            );
                        Severity: Major
                        Found in apps/strider/lib/routes/api/repo.js - About 30 mins to fix

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

                              input = input.replace(/^[^\n\r]*\u001b\[2K/gm, '').replace(/\u001b\[K[^\n\r]*/g, '').replace(/[^\n]*\r([^\n])/g, '$1').replace(/^[^\n]*\u001b\[0G/gm, '');
                          Severity: Minor
                          Found in apps/strider/dist/ember/assets/strider-ui.js and 1 other location - About 30 mins to fix
                          clients/strider-ui/app/helpers/ansi.js on lines 14..18

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

                          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

                            input = input
                              .replace(/^[^\n\r]*\u001b\[2K/gm, '')
                              .replace(/\u001b\[K[^\n\r]*/g, '')
                              .replace(/[^\n]*\r([^\n])/g, '$1')
                              .replace(/^[^\n]*\u001b\[0G/gm, '');
                          Severity: Minor
                          Found in clients/strider-ui/app/helpers/ansi.js and 1 other location - About 30 mins to fix
                          apps/strider/dist/ember/assets/strider-ui.js on lines 177..177

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

                          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

                          function afterCloned(pluginPath, cb) {
                              npm(pluginPath).install(function (err) {
                                  if (err)
                                      return cb(err);
                                  else
                          Severity: Minor
                          Found in apps/strider/dist-lib/cli/lib/plugin_manager/install_plugin.js and 1 other location - About 30 mins to fix
                          apps/strider/lib/cli/lib/plugin_manager/install_plugin.js on lines 47..52

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

                          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

                                  $(element).tooltip({title: `Started ${new Date(attrs.since).toLocaleString()}`});
                          Severity: Minor
                          Found in clients/classic-ui/client/moment/directives/time.js and 1 other location - About 30 mins to fix
                          clients/classic-ui/client/moment/directives/time.js on lines 14..14

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

                          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

                          rootRoute.get(function (req, res) {
                            res.send(req.project.provider.config);
                          });
                          Severity: Minor
                          Found in apps/strider/lib/routes/provider.js and 1 other location - About 30 mins to fix
                          apps/strider/dist-lib/routes/provider.js on lines 22..24

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

                          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

                          rootRoute.get(function (req, res) {
                              res.send(req.project.provider.config);
                          });
                          Severity: Minor
                          Found in apps/strider/dist-lib/routes/provider.js and 1 other location - About 30 mins to fix
                          apps/strider/lib/routes/provider.js on lines 28..30

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

                          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

                          function afterCloned(pluginPath, cb) {
                            npm(pluginPath).install(function (err) {
                              if (err) return cb(err);
                              else return cb(null, true);
                            });
                          Severity: Minor
                          Found in apps/strider/lib/cli/lib/plugin_manager/install_plugin.js and 1 other location - About 30 mins to fix
                          apps/strider/dist-lib/cli/lib/plugin_manager/install_plugin.js on lines 45..52

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

                          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

                          module.exports.init = function (server, sessionStore) {
                              return (common.ws = new UserSockets(io.listen(server), sessionStore));
                          };
                          Severity: Minor
                          Found in apps/strider/dist-lib/websockets.js and 1 other location - About 30 mins to fix
                          apps/strider/lib/websockets.js on lines 98..100

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

                          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

                          Severity
                          Category
                          Status
                          Source
                          Language