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

feat: add clang-tidy for pika #1515

Merged
merged 38 commits into from
May 27, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
b871a44
feature:add clang-tidy for pika
ForestLH May 14, 2023
79db0eb
feature:WIP modified clang-tidy file
ForestLH May 16, 2023
8bb85f1
feature:disable compile command clang-tidy check
ForestLH May 16, 2023
8827ff5
style:Make the code standard according to clang-tidy
ForestLH May 16, 2023
78e327d
merge upstream unstable
AlexStocks May 23, 2023
09558b9
delete double std::move
AlexStocks May 23, 2023
6200048
auto* -> auto
AlexStocks May 23, 2023
6bad717
using noncopyable
AlexStocks May 23, 2023
0f19c14
add space for override{}
AlexStocks May 23, 2023
341e190
add spaces
AlexStocks May 24, 2023
54cef5b
delete != 0
AlexStocks May 24, 2023
ff42430
format if-return
AlexStocks May 24, 2023
68b70a8
clear inheritage
AlexStocks May 24, 2023
487cb0f
format codes
AlexStocks May 24, 2023
9b9ca7c
format codes
AlexStocks May 24, 2023
569c68a
delete == 0
AlexStocks May 24, 2023
168277d
fix:fix build error
ForestLH May 25, 2023
b508696
style:disable check bool implicit convert in clang-tidy
ForestLH May 25, 2023
93b7a0d
Merge pull request #1 from AlexStocks/lihao-clang
ForestLH May 25, 2023
9f902dd
style:update code style
ForestLH May 25, 2023
d27094a
delete '!= nullptr'
AlexStocks May 25, 2023
02e17e5
format if/while
AlexStocks May 25, 2023
deaa4bb
Merge pull request #2 from ForestLH/style/clang
ForestLH May 25, 2023
f6a68d7
Merge pull request #3 from AlexStocks/lihao-clang
ForestLH May 25, 2023
5c1e24f
fix ci failure
AlexStocks May 25, 2023
9d4e024
Merge pull request #4 from AlexStocks/lihao-clang
ForestLH May 25, 2023
e919de2
fix:build ci error
ForestLH May 26, 2023
e8d9171
style:The judgment statement should not be an assignment
ForestLH May 26, 2023
de1594b
style:format codes
ForestLH May 26, 2023
6bc870c
Merge pull request #5 from ForestLH/style/clang
ForestLH May 26, 2023
3624335
style:format codes
ForestLH May 26, 2023
cb7238a
Merge pull request #6 from ForestLH/style/clang
ForestLH May 26, 2023
735fa02
format codes
AlexStocks May 26, 2023
b508399
merge upstream unstable
AlexStocks May 26, 2023
810f799
Merge branch 'unstable' into lihao-clang
AlexStocks May 26, 2023
62d8635
Merge pull request #7 from AlexStocks/lihao-clang
ForestLH May 26, 2023
008f567
format codes
AlexStocks May 26, 2023
7a2b3bd
Merge pull request #8 from AlexStocks/lihao-clang
ForestLH May 27, 2023
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
Prev Previous commit
Next Next commit
add spaces
  • Loading branch information
AlexStocks committed May 24, 2023
commit 341e190cb3c5f75dee48575ecba8c3bfddc73e90
2 changes: 1 addition & 1 deletion src/net/include/client_thread.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class ClientHandle {
/*
* DestConnectFailedHandle(...) will run the invoker's logic when socket connect failed
*/
virtual void DestConnectFailedHandle(const std::string &ip_port, const std::string &reason) const {
virtual void DestConnectFailedHandle(const std::string& ip_port, const std::string& reason) const {
UNUSED(ip_port);
UNUSED(reason);
}
Expand Down
2 changes: 1 addition & 1 deletion src/pika_geohash_helper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ GeoHashRadius geohashGetAreasByRadiusWGS84(double longitude, double latitude, do
return geohashGetAreasByRadius(longitude, latitude, radius_meters);
}

GeoHashFix52Bits geohashAlign52Bits(const GeoHashBits &hash) {
GeoHashFix52Bits geohashAlign52Bits(const GeoHashBits& hash) {
uint64_t bits = hash.bits;
bits <<= (52 - hash.step * 2);
return bits;
Expand Down
6 changes: 3 additions & 3 deletions src/pika_rm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -799,14 +799,14 @@ void PikaReplicaManager::ReplServerUpdateClientConnMap(const std::string& ip_por
pika_repl_server_->UpdateClientConnMap(ip_port, fd);
}

Status PikaReplicaManager::UpdateSyncBinlogStatus(const RmNode& slave, const LogOffset& range_start,
const LogOffset& range_end) {
Status PikaReplicaManager::UpdateSyncBinlogStatus(const RmNode& slave, const LogOffset& offset_start,
const LogOffset& offset_end) {
std::shared_lock l(partitions_rw_);
if (sync_master_partitions_.find(slave.NodePartitionInfo()) == sync_master_partitions_.end()) {
return Status::NotFound(slave.ToString() + " not found");
}
std::shared_ptr<SyncMasterPartition> partition = sync_master_partitions_[slave.NodePartitionInfo()];
Status s = partition->ConsensusUpdateSlave(slave.Ip(), slave.Port(), range_start, range_end);
Status s = partition->ConsensusUpdateSlave(slave.Ip(), slave.Port(), offset_start, offset_end);
if (!s.ok()) {
return s;
}
Expand Down
2 changes: 1 addition & 1 deletion src/pika_rsync_service.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

extern std::unique_ptr<PikaConf> g_pika_conf;

PikaRsyncService::PikaRsyncService(std::string raw_path, const int port) : raw_path_(std::move(raw_path)), port_(port) {
PikaRsyncService::PikaRsyncService(const std::string& raw_path, const int port) : raw_path_(raw_path), port_(port) {
if (raw_path_.back() != '/') {
raw_path_ += "/";
}
Expand Down