Skip to content

fix: "wrong number of arguments" must be in lower case #438

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

Closed
wants to merge 4 commits into from
Closed

fix: "wrong number of arguments" must be in lower case #438

wants to merge 4 commits into from

Conversation

lsvmello
Copy link
Contributor

Signed-off-by: Leonardo Mello [email protected]

This fixes #390.

Since the print pointed out just the "wrong number of arguments" message I lowered the command just for the WrongNumArgsError function.

Should the command also be lowered on InvalidExpireTime and UnknownSubCmd? If that's the case then is it ok to create a ToLower function for string_view types on the facade.cc or is it better to put it on another file?

I couldn't execute the facade_test also, it compiles but doesn't create any executable.

First open source PR ever so if there is any improvement just say it and I'll be glad work on it.

@romange romange requested a review from dranikpg October 26, 2022 09:23
Copy link
Contributor

@dranikpg dranikpg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi!

  1. Its great you pointed out the neighbouring functions as well. If you run SET k v EX -1 on redis, you'll see that it returns ERR invalid expire time in 'set' command. In case with UnknownSubCmd the command is returned in original form. So InvalidExpireTime can be changed as well
  2. See my comment. No need for a separate function
  3. There is no real facade_test, its a helper library for other tests

Comment on lines 54 to 55
string lcmd(cmd);
absl::AsciiStrToLower(&lcmd);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

@lsvmello lsvmello Oct 26, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I haven't seem that. Fixed!
And also lowered the command on the InvalidExpireTime

@romange
Copy link
Collaborator

romange commented Oct 26, 2022

@lsvmello Do you mind merging all the commits into a single one on your side? I could do it too but then the commit won't track to you, imho.

@lsvmello lsvmello closed this by deleting the head repository Oct 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"wrong number of arguments" must be in lower case
3 participants