Exclude Intermediate folders and .generated.h files from doc generation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -31,9 +31,16 @@ def collect_headers(input_arg: Path) -> list[tuple[Path, Path]]:
|
|||||||
base_path is used to compute relative output paths.
|
base_path is used to compute relative output paths.
|
||||||
"""
|
"""
|
||||||
if input_arg.is_file():
|
if input_arg.is_file():
|
||||||
|
if input_arg.name.endswith('.generated.h'):
|
||||||
|
print(f"Skipping generated header: {input_arg}", file=sys.stderr)
|
||||||
|
return []
|
||||||
return [(input_arg, input_arg.parent)]
|
return [(input_arg, input_arg.parent)]
|
||||||
elif input_arg.is_dir():
|
elif input_arg.is_dir():
|
||||||
return [(h, input_arg) for h in sorted(input_arg.rglob('*.h'))]
|
headers = [
|
||||||
|
h for h in sorted(input_arg.rglob('*.h'))
|
||||||
|
if 'Intermediate' not in h.parts and not h.name.endswith('.generated.h')
|
||||||
|
]
|
||||||
|
return [(h, input_arg) for h in headers]
|
||||||
else:
|
else:
|
||||||
print(f"Error: {input_arg} is not a file or directory", file=sys.stderr)
|
print(f"Error: {input_arg} is not a file or directory", file=sys.stderr)
|
||||||
return []
|
return []
|
||||||
|
|||||||
Reference in New Issue
Block a user