diff --git a/code_annotations/cli.py b/code_annotations/cli.py index 2fecaac..a7bd997 100644 --- a/code_annotations/cli.py +++ b/code_annotations/cli.py @@ -7,6 +7,7 @@ import traceback import click +from django.db.models.fields.related import RECURSIVE_RELATIONSHIP_CONSTANT from code_annotations.base import AnnotationConfig, ConfigurationException from code_annotations.find_django import DjangoSearch @@ -241,6 +242,11 @@ def generate_docs(config_file, verbosity, report_files): try: config = AnnotationConfig(config_file, verbosity) + if not report_files: + raise ConfigurationException( + "No report files provided. Please provide one or more report files to generate docs from." + ) + for key in ( "report_template_dir", "rendered_report_dir",