acsone/alfodoo

View on GitHub

Showing 538 of 538 total issues

Avoid too many return statements within this function.
Open

      return false;
Severity: Major
Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

            return false;
    Severity: Major
    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

            return null;
      Severity: Major
      Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

          return true;
        Severity: Major
        Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                  return;
          Severity: Major
          Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                    return false;
            Severity: Major
            Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                  return params;
              Severity: Major
              Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                      return null;
                Severity: Major
                Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                          return 'other';
                  Severity: Major
                  Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                            return false;
                    Severity: Major
                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                              return 'other';
                      Severity: Major
                      Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                                return 'other';
                        Severity: Major
                        Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                                  if (n == 1) return 'one';
                          Severity: Major
                          Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                                try { return new ActiveXObject('Msxml2.XMLHTTP'); } catch(e) {}
                            Severity: Major
                            Found in cmis_web/static/lib/cmisjs/superagent.7.2.0.js - About 30 mins to fix

                              Avoid too many return statements within this function.
                              Open

                                return false;
                              Severity: Major
                              Found in cmis_web/static/lib/cmisjs/superagent.7.2.0.js - About 30 mins to fix

                                Function _check_access_operation has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                Open

                                    def _check_access_operation(self, model_inst, operation):
                                        """
                                        Check if the user has the appropriate rights to perform the operation.
                                        The default is to check the access rights and access rules on the
                                        model instance. This behaviour can be adapted by defining the method
                                Severity: Minor
                                Found in cmis_web_proxy/controllers/cmis.py - About 25 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 _check_access has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                Open

                                    def _check_access(self, cmis_path, proxy_info, params):
                                        """This method check that the user can access to the requested CMIS
                                        content.
                                
                                        Security checks applied  when the proxy mode is activated,:
                                Severity: Minor
                                Found in cmis_web_proxy/controllers/cmis.py - About 25 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 get_content_details_url_from_props has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                Open

                                    def get_content_details_url_from_props(self, properties):
                                        self.ensure_one()
                                        details_type = 'document-details'
                                        if properties['cmis:baseTypeId'] == 'cmis:folder':
                                            paths = properties['cmis:path']
                                Severity: Minor
                                Found in cmis_web_alf/models/cmis_backend.py - About 25 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