localstack/localstack

View on GitHub
localstack-core/localstack/dev/run/__main__.py

Summary

Maintainability
C
1 day
Test Coverage

File __main__.py has 312 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import dataclasses
import os
from typing import Iterable, Tuple

import click
Severity: Minor
Found in localstack-core/localstack/dev/run/__main__.py - About 3 hrs to fix

    Function run has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
    Open

    def run(
        image: str = None,
        volume_dir: str = None,
        pro: bool = None,
        develop: bool = False,
    Severity: Minor
    Found in localstack-core/localstack/dev/run/__main__.py - About 3 hrs 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 run has 15 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    def run(
    Severity: Major
    Found in localstack-core/localstack/dev/run/__main__.py - About 1 hr to fix

      There are no issues that match your filters.

      Category
      Status