Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 3 additions & 22 deletions analyzer.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from pathlib import Path
import argparse

from cli.arguments import create_parser

from analysis.file_analysis import analyze_file

Expand All @@ -12,27 +13,7 @@


def main():
parser = argparse.ArgumentParser(
description="Analyze a Python codebase and generate a health report."
)

parser.add_argument(
"path",
help="Path to the Python codebase",
)

parser.add_argument(
"--json",
action="store_true",
help="Generate a JSON report",
)

parser.add_argument(
"--output",
default="codebase_report.json",
help="Output file for the JSON report"
)

parser = create_parser()
args = parser.parse_args()

p = Path(args.path)
Expand Down
Empty file added cli/__init__.py
Empty file.
26 changes: 26 additions & 0 deletions cli/arguments.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import argparse


def create_parser():
parser = argparse.ArgumentParser(
description="Analyze a Python codebase and generate a health report."
)

parser.add_argument(
"path",
help="Path to the Python codebase",
)

parser.add_argument(
"--json",
action="store_true",
help="Generate a JSON report",
)

parser.add_argument(
"--output",
default="codebase_report.json",
help="Output file for the JSON report",
)

return parser
Loading