Skip to content

Commit 88ae78c

Browse files
committed
Print option name with error msg
1 parent 14a03a1 commit 88ae78c

File tree

4 files changed

+4
-16
lines changed

4 files changed

+4
-16
lines changed

src/fosslight_prechecker/_add.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def check_input_copyright_format(input_copyright: str) -> bool:
7373
check_ok = True
7474

7575
if regex.match(input_copyright) is None:
76-
logger.warning(" You have to input with following format - '<year> <name>'")
76+
logger.warning("(-c option) You have to input with following format - '<year> <name>'")
7777
check_ok = False
7878

7979
return check_ok
@@ -422,7 +422,7 @@ def add_content(
422422
need_log_file, logging.INFO, logging.DEBUG, PKG_NAME, path_to_find)
423423

424424
if not os.path.isdir(path_to_find):
425-
logger.error(f"Check the path to find : {path_to_find}")
425+
logger.error(f"(-p option) Check the path to find : {path_to_find}")
426426
sys.exit(1)
427427

428428
# Get SPDX License List

src/fosslight_prechecker/_add_header.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -748,18 +748,6 @@ def add_header(args, project: Project, out=sys.stdout) -> int:
748748

749749
template = None
750750
commented = False
751-
# if args.template:
752-
# try:
753-
# template = _find_template(project, args.template)
754-
# except TemplateNotFound:
755-
# args.parser.error(
756-
# _("template {template} could not be found").format(
757-
# template=args.template
758-
# )
759-
# )
760-
761-
# if ".commented" in Path(template.name).suffixes:
762-
# commented = True
763751

764752
year = None
765753
if not args.exclude_year:

src/fosslight_prechecker/_precheck.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,5 +414,5 @@ def run_lint(
414414
logger.warning("Can't make result file\n")
415415
sys.exit(exit_code)
416416
else:
417-
logger.error(f"Check the path to find : {target_path}")
417+
logger.error(f"(-p option) Check the path to find : {target_path}")
418418
sys.exit(1)

src/fosslight_prechecker/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def run_main(mode: str, path, output, format, no_log, disable, copyright, licens
2525
elif mode == "convert":
2626
convert_report(path, output, format, no_log)
2727
else:
28-
print("Not supported mode. Select one of 'lint', 'add', or 'convert'")
28+
print("(mode) Not supported mode. Select one of 'lint', 'add', or 'convert'")
2929

3030

3131
def main():

0 commit comments

Comments
 (0)