Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print option name with error msg #166

Merged
merged 1 commit into from
Oct 18, 2024
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
4 changes: 2 additions & 2 deletions src/fosslight_prechecker/_add.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def check_input_copyright_format(input_copyright: str) -> bool:
check_ok = True

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

return check_ok
Expand Down Expand Up @@ -422,7 +422,7 @@ def add_content(
need_log_file, logging.INFO, logging.DEBUG, PKG_NAME, path_to_find)

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

# Get SPDX License List
Expand Down
12 changes: 0 additions & 12 deletions src/fosslight_prechecker/_add_header.py
Original file line number Diff line number Diff line change
Expand Up @@ -748,18 +748,6 @@ def add_header(args, project: Project, out=sys.stdout) -> int:

template = None
commented = False
# if args.template:
# try:
# template = _find_template(project, args.template)
# except TemplateNotFound:
# args.parser.error(
# _("template {template} could not be found").format(
# template=args.template
# )
# )

# if ".commented" in Path(template.name).suffixes:
# commented = True

year = None
if not args.exclude_year:
Expand Down
2 changes: 1 addition & 1 deletion src/fosslight_prechecker/_precheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,5 +414,5 @@ def run_lint(
logger.warning("Can't make result file\n")
sys.exit(exit_code)
else:
logger.error(f"Check the path to find : {target_path}")
logger.error(f"(-p option) Check the path to find : {target_path}")
sys.exit(1)
2 changes: 1 addition & 1 deletion src/fosslight_prechecker/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def run_main(mode: str, path, output, format, no_log, disable, copyright, licens
elif mode == "convert":
convert_report(path, output, format, no_log)
else:
print("Not supported mode. Select one of 'lint', 'add', or 'convert'")
print("(mode) Not supported mode. Select one of 'lint', 'add', or 'convert'")


def main():
Expand Down
Loading