nus-mtp/sashimi-note

View on GitHub

Showing 330 of 330 total issues

Avoid too many return statements within this function.
Open

        return [node, result[1]];
Severity: Major
Found in sashimi-webapp/src/logic/documentPackager/plugins/ASCIIMathTeXImg.js - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

            return false;

      Avoid too many return statements within this function.
      Open

            return BREAK_PAGE;
      Severity: Major
      Found in sashimi-webapp/src/logic/renderer/core.js - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

            return new Promise((resolve, reject) => reject(ERROR_SAME_FOLDER_NAME));
        Severity: Major
        Found in sashimi-webapp/src/logic/filemanager/data/folder.js - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

              return storage.renameFolder(this.id, newFolderName)
              .then(() => {
                const oldFolderName = this.name;
                this.name = newFolderName;
                this.path = this.path.replace(oldFolderName, newFolderName);
          Severity: Major
          Found in sashimi-webapp/src/logic/filemanager/data/folder.js - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                    return [`\\sqrt{${result[0]}}`, result[1]];
            Severity: Major
            Found in sashimi-webapp/src/logic/documentPackager/plugins/ASCIIMathTeXImg.js - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                    if (result2[0]==null) return [`{${AMTgetTeXsymbol(symbol)}}`, str];
              Severity: Major
              Found in sashimi-webapp/src/logic/documentPackager/plugins/ASCIIMathTeXImg.js - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                      return [`{${AMTgetTeXsymbol(symbol)}}`, str];
                Severity: Major
                Found in sashimi-webapp/src/logic/documentPackager/plugins/ASCIIMathTeXImg.js - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                          return [`${AMTgetTeXsymbol(symbol)}{${result[0]}}`, result[1]];
                  Severity: Major
                  Found in sashimi-webapp/src/logic/documentPackager/plugins/ASCIIMathTeXImg.js - About 30 mins to fix

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

                        const firstFolder = [{
                          folder_id: 1,
                          parent_folder_id: 0,
                          organization_id: 1,
                          creation_date: '2015.01.09 11:33:12',
                    sashimi-webapp/test/unit/specs/database/sql-related/sqlCommands.spec.js on lines 246..254
                    sashimi-webapp/test/unit/specs/database/sql-related/sqlCommands.spec.js on lines 255..263
                    sashimi-webapp/test/unit/specs/database/sql-related/sqlCommands.spec.js on lines 264..272
                    sashimi-webapp/test/unit/specs/database/sql-related/sqlCommands.spec.js on lines 273..281
                    sashimi-webapp/test/unit/specs/database/sql-related/sqlCommands.spec.js on lines 282..290
                    sashimi-webapp/test/unit/specs/database/sql-related/sqlCommands.spec.js on lines 291..299

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

                        const thirdFolder = [{
                          folder_id: 3,
                          parent_folder_id: 2,
                          organization_id: 1,
                          creation_date: '2015.01.09 11:33:12',
                    sashimi-webapp/test/unit/specs/database/sql-related/sqlCommands.spec.js on lines 237..245
                    sashimi-webapp/test/unit/specs/database/sql-related/sqlCommands.spec.js on lines 246..254
                    sashimi-webapp/test/unit/specs/database/sql-related/sqlCommands.spec.js on lines 264..272
                    sashimi-webapp/test/unit/specs/database/sql-related/sqlCommands.spec.js on lines 273..281
                    sashimi-webapp/test/unit/specs/database/sql-related/sqlCommands.spec.js on lines 282..290
                    sashimi-webapp/test/unit/specs/database/sql-related/sqlCommands.spec.js on lines 291..299

                    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

                    Avoid too many return statements within this function.
                    Open

                            return [`{${AMTgetTeXsymbol(symbol)}{${result[0]}}}`, result[1]];
                    Severity: Major
                    Found in sashimi-webapp/src/logic/documentPackager/plugins/ASCIIMathTeXImg.js - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                            return [newFrag, result2[1]];
                      Severity: Major
                      Found in sashimi-webapp/src/logic/documentPackager/plugins/ASCIIMathTeXImg.js - About 30 mins to fix

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

                            const seventhFolder = [{
                              folder_id: 7,
                              parent_folder_id: 6,
                              organization_id: 1,
                              creation_date: '2015.01.09 11:33:12',
                        sashimi-webapp/test/unit/specs/database/sql-related/sqlCommands.spec.js on lines 237..245
                        sashimi-webapp/test/unit/specs/database/sql-related/sqlCommands.spec.js on lines 246..254
                        sashimi-webapp/test/unit/specs/database/sql-related/sqlCommands.spec.js on lines 255..263
                        sashimi-webapp/test/unit/specs/database/sql-related/sqlCommands.spec.js on lines 264..272
                        sashimi-webapp/test/unit/specs/database/sql-related/sqlCommands.spec.js on lines 273..281
                        sashimi-webapp/test/unit/specs/database/sql-related/sqlCommands.spec.js on lines 282..290

                        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

                        Avoid too many return statements within this function.
                        Open

                            return false;

                          Avoid too many return statements within this function.
                          Open

                              return (element.getAttribute('page') === '');
                          Severity: Major
                          Found in sashimi-webapp/src/logic/renderer/core.js - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                                  if (result[0]==null) return [`{${AMTgetTeXsymbol(symbol)}}`, str];
                            Severity: Major
                            Found in sashimi-webapp/src/logic/documentPackager/plugins/ASCIIMathTeXImg.js - About 30 mins to fix

                              Avoid too many return statements within this function.
                              Open

                                      return [`\\cancel{${result[0]}}`, result[1]];
                              Severity: Major
                              Found in sashimi-webapp/src/logic/documentPackager/plugins/ASCIIMathTeXImg.js - About 30 mins to fix

                                Avoid too many return statements within this function.
                                Open

                                      if (result[0]==null) return [`{${AMTgetTeXsymbol(symbol)}}`, str];
                                Severity: Major
                                Found in sashimi-webapp/src/logic/documentPackager/plugins/ASCIIMathTeXImg.js - About 30 mins to fix

                                  Avoid too many return statements within this function.
                                  Open

                                            return [`{${AMTgetTeXsymbol(symbol)}}`, str];
                                  Severity: Major
                                  Found in sashimi-webapp/src/logic/documentPackager/plugins/ASCIIMathTeXImg.js - About 30 mins to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language