diff --git a/chasten/main.py b/chasten/main.py index 77f7f252..85085312 100644 --- a/chasten/main.py +++ b/chasten/main.py @@ -441,6 +441,17 @@ def analyze( # noqa: PLR0913, PLR0915 save: bool = typer.Option(False, help="Enable saving of output file(s)."), ) -> None: """💫 Analyze the AST of Python source code.""" + # add name of project + output.logger.debug(f"Analyze the AST of project {project} ") + # add logger for debug + output.setup(debug_level, debug_destination) + output.logger.debug(f"Display verbose output? {verbose}") + output.logger.debug(f"Debug level? {debug_level.value}") + output.logger.debug(f"Debug destination? {debug_destination.value}") + # add logger for path + output.logger.debug(f"Input path {input_path}") + output.logger.debug(f"Save file in {output_directory}") + output.logger.debug(f"Config path: {config}") # output the preamble, including extra parameters specific to this function output_preamble( verbose, @@ -451,6 +462,7 @@ def analyze( # noqa: PLR0913, PLR0915 ) # extract the current version of the program chasten_version = util.get_chasten_version() + output.logger.debug(f"Current version of chasten: {chasten_version}") # create the include and exclude criteria include = results.CheckCriterion( attribute=str(checks.fix_check_criterion(check_include[0])), @@ -482,6 +494,7 @@ def analyze( # noqa: PLR0913, PLR0915 (validated, checks_dict) = validate_configuration_files(config, verbose) # some aspect of the configuration was not # valid, so exit early and signal an error + if not validated: output.console.print( "\n:person_shrugging: Cannot perform analysis due to configuration error(s).\n" @@ -534,6 +547,7 @@ def analyze( # noqa: PLR0913, PLR0915 # that attribute does not exist inside of the current_check; importantly, # having a count or a min or a max is all optional in a checks file (min_count, max_count) = checks.extract_min_max(current_check) + output.logger.debug(f"{min_count},{max_count}") # extract details about the check to display in the header # of the syntax box for this specific check check_id = current_check[constants.checks.Check_Id] # type: ignore diff --git a/scripts/extract_coverage.py b/scripts/extract_coverage.py index 680c65ca..53d9be36 100644 --- a/scripts/extract_coverage.py +++ b/scripts/extract_coverage.py @@ -12,5 +12,5 @@ filename = "chasten/util.py" covered_lines = set(data.lines(filename)) # type: ignore -print(f"Covered lines in {filename}:") # noqa +print(f"Covered lines in {filename}:") # noqa print(covered_lines) # noqa