FredericHeem/starhackit

View on GitHub

Showing 270 of 270 total issues

File runApi.js has 350 lines of code (exceeds 250 allowed). Consider refactoring.
Open

const assert = require("assert");
const {
  switchCase,
  fork,
  tryCatch,
Severity: Minor
Found in server/src/plugins/cloudDiagram/api/runApi.js - About 4 hrs to fix

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

          {
            pathname: "/",
            method: "get",
            handler: (context) =>
              pipe([
    server/src/plugins/cloudDiagram/api/runApi.js on lines 256..275

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

    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

          {
            pathname: "/",
            method: "get",
            handler: (context) =>
              pipe([
    Severity: Major
    Found in server/src/plugins/cloudDiagram/api/runApi.js and 1 other location - About 4 hrs to fix
    server/src/plugins/cloudDiagram/api/cloudAuthenticationApi.js on lines 76..95

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

    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

    Function azureFormContent has 108 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export const azureFormContent = (context) => {
      const {
        tr,
        theme: { palette },
      } = context;
    Severity: Major
    Found in client/src/app_infra/infra/azureConfig.js - About 4 hrs to fix

      Function MailJob has 105 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function MailJob(config, sendMail) {
        let log = require("logfilename")(__filename);
      
        log.debug("MailJob options: ", config.mail);
      
      
      Severity: Major
      Found in server/src/plugins/users/jobs/mail/MailJob.js - About 4 hrs to fix

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

        module.exports = ({ sql }) => {
          const tableName = "document";
          return {
            tableName,
            insert: (data) =>
        Severity: Major
        Found in server/src/plugins/document/DocumentSql.js and 1 other location - About 4 hrs to fix
        server/src/plugins/cloudDiagram/sql/GitCredentialSql.js on lines 7..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 119.

        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 = ({ sql }) => {
          const tableName = "git_credential";
          return {
            tableName,
            insert: (data) =>
        Severity: Major
        Found in server/src/plugins/cloudDiagram/sql/GitCredentialSql.js and 1 other location - About 4 hrs to fix
        server/src/plugins/document/DocumentSql.js on lines 7..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 119.

        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

        Function exports has 98 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        module.exports = function (options) {
          const config = _.merge(
            {},
            {
              target: "web",
        Severity: Major
        Found in client/webpack.config.js - About 3 hrs to fix

          File testOidc.js has 326 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          const assert = require("assert");
          const { tap, tryCatch, pipe, get } = require("rubico");
          const testMngr = require("test/testManager");
          const Axios = require("axios");
          const jose = require("jose");
          Severity: Minor
          Found in server/src/plugins/oidc/testOidc.js - About 3 hrs to fix

            Function Footer has 94 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              const Footer = observer(() => {
                useEffect(() => {
                  versionStore.fetch();
                }, []);
            
            
            Severity: Major
            Found in client/src/app_infra/footer.js - About 3 hrs to fix

              Function default has 92 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              export default function (context) {
                const { rest, tr } = context;
                const asyncOpCreate = AsyncOp(context);
                const Alert = alert(context);
                function Routes(stores) {
              Severity: Major
              Found in client/src/app_user/profile/profileModule.js - About 3 hrs to fix

                Function Ticket has 92 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function Ticket(app) {
                  const { models } = app.plugins.get().ticket;
                
                  const api = {
                    pathname: "/ticket",
                Severity: Major
                Found in server/src/plugins/ticket/index.js - About 3 hrs to fix

                  File gitUtils.js has 316 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  const assert = require("assert");
                  const { resolve } = require("path");
                  const { readdir } = require("fs").promises;
                  const {
                    pipe,
                  Severity: Minor
                  Found in server/src/plugins/cloudDiagram/gitUtils.js - About 3 hrs to fix

                    Function default has 89 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    export default function (context) {
                      const { rest, tr, history, alertStack, emitter } = context;
                      const asyncOpCreate = AsyncOp(context);
                      const Alert = alert(context);
                      const wizardStore = wizardStoreCreate(context);
                    Severity: Major
                    Found in client/src/app_infra/infra/infraModule.js - About 3 hrs to fix

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

                              <FormGroup className="password">
                                <PasswordInput
                                  id="password"
                                  onChange={(e) => {
                                    store.password = e.target.value;
                      Severity: Major
                      Found in client/src/parts/auth/views/resetPasswordView.js and 1 other location - About 3 hrs to fix
                      client/src/parts/auth/components/localLoginForm.js on lines 91..101

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

                      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

                              <FormGroup className="username">
                                <Input
                                  id="username"
                                  onChange={(e) => {
                                    store.username = e.target.value;
                      Severity: Major
                      Found in client/src/parts/auth/components/registerForm.js and 1 other location - About 3 hrs to fix
                      client/src/parts/auth/components/registerForm.js on lines 40..50

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

                      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

                              <FormGroup className="email">
                                <Input
                                  id="email"
                                  onChange={(e) => {
                                    store.email = e.target.value;
                      Severity: Major
                      Found in client/src/parts/auth/components/registerForm.js and 1 other location - About 3 hrs to fix
                      client/src/parts/auth/components/registerForm.js on lines 29..39

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

                      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

                              <FormGroup className="password">
                                <Input
                                  id="password"
                                  onChange={(e) => {
                                    store.password = e.target.value;
                      Severity: Major
                      Found in client/src/parts/auth/components/localLoginForm.js and 1 other location - About 3 hrs to fix
                      client/src/parts/auth/views/resetPasswordView.js on lines 87..97

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

                      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 3 locations. Consider refactoring.
                      Open

                            {
                              pathname: "/",
                              method: "patch",
                              handler: (context) =>
                                pipe([
                      Severity: Major
                      Found in server/src/plugins/cloudDiagram/api/gitRepositoryApi.js and 2 other locations - About 3 hrs to fix
                      server/src/plugins/cloudDiagram/api/gitCredentialApi.js on lines 115..132
                      server/src/plugins/cloudDiagram/api/workspaceApi.js on lines 121..138

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

                      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 3 locations. Consider refactoring.
                      Open

                            {
                              pathname: "/:workspace_id",
                              method: "patch",
                              handler: (context) =>
                                pipe([
                      Severity: Major
                      Found in server/src/plugins/cloudDiagram/api/workspaceApi.js and 2 other locations - About 3 hrs to fix
                      server/src/plugins/cloudDiagram/api/gitCredentialApi.js on lines 115..132
                      server/src/plugins/cloudDiagram/api/gitRepositoryApi.js on lines 108..125

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

                      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