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

Improve code style in cluster #2272

Merged
merged 14 commits into from
May 1, 2024
Merged

Improve code style in cluster #2272

merged 14 commits into from
May 1, 2024

Conversation

jihuayu
Copy link
Member

@jihuayu jihuayu commented Apr 26, 2024

I haven't modified any specific logic. Only tidy codes to make Sonarcloud happy.

https://sonarcloud.io/project/issues?fileUuids=AYuMX0sBEoUnDAVyI8Dx&resolved=false&id=apache_kvrocks

@jihuayu jihuayu marked this pull request as ready for review April 26, 2024 06:28
@jihuayu jihuayu requested a review from git-hulk April 26, 2024 06:28
@PragmaTwice PragmaTwice changed the title Tidy code Improve code style in cluster Apr 26, 2024
src/cluster/cluster.h Outdated Show resolved Hide resolved
src/cluster/cluster.cc Outdated Show resolved Hide resolved
src/cluster/cluster.cc Outdated Show resolved Hide resolved
src/cluster/cluster.cc Outdated Show resolved Hide resolved
src/cluster/cluster.cc Outdated Show resolved Hide resolved
src/cluster/cluster.cc Outdated Show resolved Hide resolved
Copy link
Member

@git-hulk git-hulk left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

sonarcloud bot commented Apr 30, 2024

@git-hulk git-hulk merged commit 76757e1 into apache:unstable May 1, 2024
31 checks passed
std::array subcommands = {"setnodes", "setnodeid", "setslot", "import", "reset"};

return std::any_of(std::begin(subcommands), std::end(subcommands),
[&subcommand](const std::string &val) { return util::EqualICase(val, subcommand); });
Copy link
Member

Choose a reason for hiding this comment

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

The parameter type should be string_view or auto.

Copy link
Member Author

Choose a reason for hiding this comment

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

sorry I will fix it

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.

5 participants