localstack/localstack

View on GitHub

Showing 3,140 of 3,140 total issues

File provider.py has 1656 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import copy
import datetime
import logging
import os
from collections import defaultdict
Severity: Major
Found in localstack/services/s3/provider.py - About 4 days to fix

    File __init__.py has 1612 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    from typing import Dict, Iterator, List, Optional, TypedDict
    
    from localstack.aws.api import RequestContext, ServiceException, ServiceRequest, handler
    
    AccessPolicy = str
    Severity: Major
    Found in localstack/aws/api/logs/__init__.py - About 4 days to fix

      ASLParserListener has 206 functions (exceeds 20 allowed). Consider refactoring.
      Open

      class ASLParserListener(ParseTreeListener):
      
          # Enter a parse tree produced by ASLParser#state_machine.
          def enterState_machine(self, ctx:ASLParser.State_machineContext):
              pass

        File provider.py has 1509 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        import copy
        import hashlib
        import json
        import logging
        import re
        Severity: Major
        Found in localstack/services/sqs/provider.py - About 4 days to fix

          File __init__.py has 1491 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          from datetime import datetime
          from typing import Dict, List, Optional, TypedDict
          
          from localstack.aws.api import RequestContext, ServiceException, ServiceRequest, handler
          
          
          Severity: Major
          Found in localstack/aws/api/events/__init__.py - About 3 days to fix

            File __init__.py has 1484 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            from datetime import datetime
            from typing import Dict, List, Optional, TypedDict
            
            from localstack.aws.api import RequestContext, ServiceException, ServiceRequest, handler
            
            
            Severity: Major
            Found in localstack/aws/api/es/__init__.py - About 3 days to fix

              File __init__.py has 1475 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              from typing import List, Optional, TypedDict
              
              from localstack.aws.api import RequestContext, ServiceException, ServiceRequest, handler
              
              AccountId = str
              Severity: Major
              Found in localstack/aws/api/route53resolver/__init__.py - About 3 days to fix

                File serializer.py has 1474 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                """
                Response serializers for the different AWS service protocols.
                
                The module contains classes that take a service's response dict, and
                given an operation model, serialize the HTTP response according to the
                Severity: Major
                Found in localstack/aws/protocol/serializer.py - About 3 days to fix

                  File __init__.py has 1411 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  from datetime import datetime
                  from typing import List, Optional, TypedDict
                  
                  from localstack.aws.api import RequestContext, ServiceException, ServiceRequest, handler
                  
                  
                  Severity: Major
                  Found in localstack/aws/api/swf/__init__.py - About 3 days to fix

                    File __init__.py has 1406 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    from datetime import datetime
                    from typing import Dict, List, Optional, TypedDict
                    
                    from localstack.aws.api import RequestContext, ServiceException, ServiceRequest, handler
                    
                    
                    Severity: Major
                    Found in localstack/aws/api/ses/__init__.py - About 3 days to fix

                      File __init__.py has 1367 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      from datetime import datetime
                      from typing import Dict, List, Optional, TypedDict
                      
                      from localstack.aws.api import RequestContext, ServiceException, ServiceRequest, handler
                      
                      
                      Severity: Major
                      Found in localstack/aws/api/kms/__init__.py - About 3 days to fix

                        File publisher.py has 1251 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        import abc
                        import base64
                        import copy
                        import datetime
                        import hashlib
                        Severity: Major
                        Found in localstack/services/sns/publisher.py - About 3 days to fix

                          Function import_api_from_openapi_spec has a Cognitive Complexity of 158 (exceeds 5 allowed). Consider refactoring.
                          Open

                          def import_api_from_openapi_spec(
                              rest_api: RestAPI, body: dict, context: RequestContext
                          ) -> Optional[RestAPI]:
                              """Import an API from an OpenAPI spec document"""
                          
                          
                          Severity: Minor
                          Found in localstack/services/apigateway/helpers.py - About 3 days 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 template_deployer.py has 1237 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          import base64
                          import json
                          import logging
                          import re
                          import traceback
                          Severity: Major
                          Found in localstack/services/cloudformation/engine/template_deployer.py - About 3 days to fix

                            File __init__.py has 1233 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            from datetime import datetime
                            from typing import Dict, List, Optional, TypedDict
                            
                            from localstack.aws.api import RequestContext, ServiceException, ServiceRequest, handler
                            
                            
                            Severity: Major
                            Found in localstack/aws/api/transcribe/__init__.py - About 3 days to fix

                              IamApi has 159 functions (exceeds 20 allowed). Consider refactoring.
                              Open

                              class IamApi:
                                  service = "iam"
                                  version = "2010-05-08"
                              
                                  @handler("AddClientIDToOpenIDConnectProvider")
                              Severity: Major
                              Found in localstack/aws/api/iam/__init__.py - About 3 days to fix

                                File ASLLexer.py has 1198 lines of code (exceeds 250 allowed). Consider refactoring.
                                Open

                                # Generated from ASLLexer.g4 by ANTLR 4.13.1
                                from antlr4 import *
                                from io import StringIO
                                import sys
                                if sys.version_info[1] > 5:
                                Severity: Major
                                Found in localstack/services/stepfunctions/asl/antlr/runtime/ASLLexer.py - About 3 days to fix

                                  File helpers.py has 1197 lines of code (exceeds 250 allowed). Consider refactoring.
                                  Open

                                  import contextlib
                                  import copy
                                  import hashlib
                                  import json
                                  import logging
                                  Severity: Major
                                  Found in localstack/services/apigateway/helpers.py - About 3 days to fix

                                    File provider.py has 1180 lines of code (exceeds 250 allowed). Consider refactoring.
                                    Open

                                    import base64
                                    import copy
                                    import datetime
                                    import logging
                                    import os
                                    Severity: Major
                                    Found in localstack/services/kms/provider.py - About 3 days to fix

                                      File __init__.py has 1159 lines of code (exceeds 250 allowed). Consider refactoring.
                                      Open

                                      from datetime import datetime
                                      from typing import List, Optional, TypedDict
                                      
                                      from localstack.aws.api import RequestContext, ServiceException, ServiceRequest, handler
                                      
                                      
                                      Severity: Major
                                      Found in localstack/aws/api/stepfunctions/__init__.py - About 2 days to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language