Showing 3,577 of 10,667 total issues

File exp_domain_test.py has 17203 lines of code (exceeds 250 allowed). Consider refactoring.
Open

# coding: utf-8
#
# Copyright 2014 The Oppia Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Severity: Major
Found in core/domain/exp_domain_test.py - About 1 mo to fix

    Function exports has a Cognitive Complexity of 2434 (exceeds 5 allowed). Consider refactoring.
    Open

    module.exports = (function() {
      /*
       * Generated by PEG.js 0.8.0.
       *
       * http://pegjs.majda.cz/
    Severity: Minor
    Found in core/templates/expressions/parser.js - About 1 mo 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

    File exp_services_test.py has 8658 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    # coding: utf-8
    #
    # Copyright 2014 The Oppia Authors. All Rights Reserved.
    #
    # Licensed under the Apache License, Version 2.0 (the "License");
    Severity: Major
    Found in core/domain/exp_services_test.py - About 3 wks to fix

      File constants.ts has 6973 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      // We are using eslint disable here for multilines because we have used quotes
      // around properties at a lot of places so it is not possible to use
      // "eslint disable next line" for each of them.
      /* eslint-disable oppia/no-multiline-disable */
      /* eslint-disable quote-props */
      Severity: Major
      Found in assets/constants.ts - About 2 wks to fix

        File acl_decorators_test.py has 6818 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        # coding: utf-8
        #
        # Copyright 2017 The Oppia Authors. All Rights Reserved.
        #
        # Licensed under the Apache License, Version 2.0 (the "License");
        Severity: Major
        Found in core/controllers/acl_decorators_test.py - About 2 wks to fix

          File suggestion_services_test.py has 6486 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          # Copyright 2018 The Oppia Authors. All Rights Reserved.
          #
          # Licensed under the Apache License, Version 2.0 (the "License");
          # you may not use this file except in compliance with the License.
          # You may obtain a copy of the License at
          Severity: Major
          Found in core/domain/suggestion_services_test.py - About 2 wks to fix

            File email_manager_test.py has 6121 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            # Copyright 2014 The Oppia Authors. All Rights Reserved.
            #
            # Licensed under the Apache License, Version 2.0 (the "License");
            # you may not use this file except in compliance with the License.
            # You may obtain a copy of the License at
            Severity: Major
            Found in core/domain/email_manager_test.py - About 2 wks to fix

              File gae_models_test.py has 5692 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              # coding: utf-8
              #
              # Copyright 2018 The Oppia Authors. All Rights Reserved.
              #
              # Licensed under the Apache License, Version 2.0 (the "License");
              Severity: Major
              Found in core/storage/suggestion/gae_models_test.py - About 2 wks to fix

                File exp_domain.py has 5347 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                # coding: utf-8
                #
                # Copyright 2014 The Oppia Authors. All Rights Reserved.
                #
                # Licensed under the Apache License, Version 2.0 (the "License");
                Severity: Major
                Found in core/domain/exp_domain.py - About 2 wks to fix

                  File wipeout_service_test.py has 5125 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  # Copyright 2020 The Oppia Authors. All Rights Reserved.
                  #
                  # Licensed under the Apache License, Version 2.0 (the "License");
                  # you may not use this file except in compliance with the License.
                  # You may obtain a copy of the License at
                  Severity: Major
                  Found in core/domain/wipeout_service_test.py - About 2 wks to fix

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

                    module.exports = (function() {
                      /*
                       * Generated by PEG.js 0.8.0.
                       *
                       * http://pegjs.majda.cz/
                    Severity: Major
                    Found in core/templates/expressions/parser.js - About 2 wks to fix

                      Function parse has 2839 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        function parse(input) {
                          var options = arguments.length > 1 ? arguments[1] : {},
                      
                              peg$FAILED = {},
                      
                      
                      Severity: Major
                      Found in core/templates/expressions/parser.js - About 2 wks to fix

                        File state_domain.py has 3954 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        # coding: utf-8
                        #
                        # Copyright 2018 The Oppia Authors. All Rights Reserved.
                        #
                        # Licensed under the Apache License, Version 2.0 (the "License");
                        Severity: Major
                        Found in core/domain/state_domain.py - About 1 wk to fix

                          File pylint_extensions_test.py has 3929 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          # coding: utf-8
                          #
                          # Copyright 2018 The Oppia Authors. All Rights Reserved.
                          #
                          # Licensed under the Apache License, Version 2.0 (the "License");
                          Severity: Major
                          Found in scripts/linters/pylint_extensions_test.py - About 1 wk to fix

                            File suggestion_registry_test.py has 3714 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            # Copyright 2018 The Oppia Authors. All Rights Reserved.
                            #
                            # Licensed under the Apache License, Version 2.0 (the "License");
                            # you may not use this file except in compliance with the License.
                            # You may obtain a copy of the License at
                            Severity: Major
                            Found in core/domain/suggestion_registry_test.py - About 1 wk to fix

                              File acl_decorators.py has 3688 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              # coding: utf-8
                              #
                              # Copyright 2017 The Oppia Authors. All Rights Reserved.
                              #
                              # Licensed under the Apache License, Version 2.0 (the "License");
                              Severity: Major
                              Found in core/controllers/acl_decorators.py - About 1 wk to fix

                                File question_services_test.py has 3686 lines of code (exceeds 250 allowed). Consider refactoring.
                                Open

                                # coding: utf-8
                                #
                                # Copyright 2018 The Oppia Authors. All Rights Reserved.
                                #
                                # Licensed under the Apache License, Version 2.0 (the "License");
                                Severity: Major
                                Found in core/domain/question_services_test.py - About 1 wk to fix

                                  File user_services_test.py has 3398 lines of code (exceeds 250 allowed). Consider refactoring.
                                  Open

                                  # coding: utf-8
                                  #
                                  # Copyright 2014 The Oppia Authors. All Rights Reserved.
                                  #
                                  # Licensed under the Apache License, Version 2.0 (the "License");
                                  Severity: Major
                                  Found in core/domain/user_services_test.py - About 1 wk to fix

                                    File suggestion_services.py has 3301 lines of code (exceeds 250 allowed). Consider refactoring.
                                    Open

                                    # Copyright 2018 The Oppia Authors. All Rights Reserved.
                                    #
                                    # Licensed under the Apache License, Version 2.0 (the "License");
                                    # you may not use this file except in compliance with the License.
                                    # You may obtain a copy of the License at
                                    Severity: Major
                                    Found in core/domain/suggestion_services.py - About 1 wk to fix

                                      File state_domain_test.py has 3299 lines of code (exceeds 250 allowed). Consider refactoring.
                                      Open

                                      # coding: utf-8
                                      #
                                      # Copyright 2018 The Oppia Authors. All Rights Reserved.
                                      #
                                      # Licensed under the Apache License, Version 2.0 (the "License");
                                      Severity: Major
                                      Found in core/domain/state_domain_test.py - About 1 wk to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language