main.py: explain --single-file and --follow-closure

This commit is contained in:
Ghjuvan Lacambre
2022-03-02 10:46:19 +01:00
committed by Ghjuvan Lacambre
parent bfa51ef352
commit eafd76dec3

View File

@@ -7,18 +7,22 @@ import os
@click.command()
@click.option("--single-file", is_flag=False)
@click.option("--follow-closure", is_flag=True)
@click.option("--single-file", is_flag=False, help="Reduce only this file.")
@click.option(
"--follow-closure",
is_flag=True,
help="Allow reducing with'ed units when using --single-file.",
)
@click.argument("project_file")
@click.argument("predicate")
def main(single_file, follow_closure, project_file, predicate):
"""Reduces the closure of the given main file in the
given project as long as predicate returns 0.
given project as long as predicate returns 0.
For instance: adareducer.py sdc.gpr main.adb check.sh
For instance: adareducer.py sdc.gpr main.adb check.sh
Where check.sh is a script which checks for the property
that we want and returns 0 if we do have it.
Where check.sh is a script which checks for the property
that we want and returns 0 if we do have it.
"""
# sanity check