Skip to content

Commit 063f265

Browse files
committed
Upgrade test image to use clang-tidy 17
1 parent 0beeb4f commit 063f265

File tree

4 files changed

+12
-10
lines changed

4 files changed

+12
-10
lines changed

.github/workflows/ci-pr-validation.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ jobs:
8080
lint:
8181
name: Lint
8282
needs: formatting-check
83-
runs-on: ubuntu-22.04
83+
runs-on: ubuntu-24.04
8484
timeout-minutes: 120
8585

8686
steps:
@@ -107,7 +107,7 @@ jobs:
107107
unit-tests:
108108
name: Run unit tests
109109
needs: formatting-check
110-
runs-on: ubuntu-22.04
110+
runs-on: ubuntu-24.04
111111
timeout-minutes: 120
112112

113113
steps:

build-support/run_clang_tidy.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,6 @@ rm -f files.txt
2929
for FILE in $FILES; do
3030
echo $FILE >> files.txt
3131
done
32-
run-clang-tidy -p build $(cat files.txt)
32+
# On macOS, run-clang-tidy from llvm@17 requires python as the env, so we cannot run it directly
33+
SCRIPT=$(which run-clang-tidy)
34+
python3 $SCRIPT -p build $(cat files.txt)

lib/Commands.cc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ SharedBuffer Commands::newPartitionMetadataRequest(const std::string& topic, uin
138138
CommandPartitionedTopicMetadata* partitionMetadata = cmd.mutable_partitionmetadata();
139139
partitionMetadata->set_topic(topic);
140140
partitionMetadata->set_request_id(requestId);
141-
const SharedBuffer buffer = writeMessageWithSize(cmd);
141+
SharedBuffer buffer = writeMessageWithSize(cmd);
142142
cmd.clear_partitionmetadata();
143143
return buffer;
144144
}
@@ -154,7 +154,7 @@ SharedBuffer Commands::newLookup(const std::string& topic, const bool authoritat
154154
lookup->set_authoritative(authoritative);
155155
lookup->set_request_id(requestId);
156156
lookup->set_advertised_listener_name(listenerName);
157-
const SharedBuffer buffer = writeMessageWithSize(cmd);
157+
SharedBuffer buffer = writeMessageWithSize(cmd);
158158
cmd.clear_lookuptopic();
159159
return buffer;
160160
}
@@ -173,7 +173,7 @@ SharedBuffer Commands::newGetSchema(const std::string& topic, const std::string&
173173
getSchema->set_schema_version(version);
174174
}
175175

176-
const SharedBuffer buffer = writeMessageWithSize(cmd);
176+
SharedBuffer buffer = writeMessageWithSize(cmd);
177177
cmd.clear_getschema();
178178
return buffer;
179179
}
@@ -186,7 +186,7 @@ SharedBuffer Commands::newConsumerStats(uint64_t consumerId, uint64_t requestId)
186186
CommandConsumerStats* consumerStats = cmd.mutable_consumerstats();
187187
consumerStats->set_consumer_id(consumerId);
188188
consumerStats->set_request_id(requestId);
189-
const SharedBuffer buffer = writeMessageWithSize(cmd);
189+
SharedBuffer buffer = writeMessageWithSize(cmd);
190190
cmd.clear_consumerstats();
191191
return buffer;
192192
}
@@ -618,7 +618,7 @@ SharedBuffer Commands::newGetLastMessageId(uint64_t consumerId, uint64_t request
618618
CommandGetLastMessageId* getLastMessageId = cmd.mutable_getlastmessageid();
619619
getLastMessageId->set_consumer_id(consumerId);
620620
getLastMessageId->set_request_id(requestId);
621-
const SharedBuffer buffer = writeMessageWithSize(cmd);
621+
SharedBuffer buffer = writeMessageWithSize(cmd);
622622
cmd.clear_getlastmessageid();
623623
return buffer;
624624
}
@@ -632,7 +632,7 @@ SharedBuffer Commands::newGetTopicsOfNamespace(const std::string& nsName,
632632
getTopics->set_namespace_(nsName);
633633
getTopics->set_mode(static_cast<proto::CommandGetTopicsOfNamespace_Mode>(mode));
634634

635-
const SharedBuffer buffer = writeMessageWithSize(cmd);
635+
SharedBuffer buffer = writeMessageWithSize(cmd);
636636
cmd.clear_gettopicsofnamespace();
637637
return buffer;
638638
}

lib/auth/AuthOauth2.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ KeyFile KeyFile::fromParamMap(ParamMap& params) {
124124
if (endPos == std::string::npos) {
125125
return "";
126126
}
127-
const auto prefix = url.substr(startPos, endPos - startPos);
127+
auto prefix = url.substr(startPos, endPos - startPos);
128128
startPos = endPos + 1;
129129
return prefix;
130130
};

0 commit comments

Comments
 (0)