-
-
Notifications
You must be signed in to change notification settings - Fork 296
Open
@bearomorphism
Description
Description
I just think it's not a good design to validate and reassign things in a function. The function name itself is confusing.
commitizen/commitizen/commands/check.py
Lines 51 to 62 in 47beadc
def _valid_command_argument(self):
num_exclusive_args_provided = sum(
arg is not None
for arg in (self.commit_msg_file, self.commit_msg, self.rev_range)
)
if num_exclusive_args_provided == 0 and not sys.stdin.isatty():
self.commit_msg = sys.stdin.read()
elif num_exclusive_args_provided != 1:
raise InvalidCommandArgumentError(
"Only one of --rev-range, --message, and --commit-msg-file is permitted by check command! "
"See 'cz check -h' for more information"
)
Possible Solution
No response
Additional context
No response
Additional context
No response