Skip to content

Commit dfbf0fa

Browse files
committed
build: use Ubuntu 22.04 for clang-format
1 parent 48f75a8 commit dfbf0fa

File tree

3 files changed

+8
-11
lines changed

3 files changed

+8
-11
lines changed

.github/workflows/linting.yml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,21 +35,16 @@ jobs:
3535

3636
format:
3737
name: Clang Format
38-
runs-on: ubuntu-20.04
38+
runs-on: ubuntu-22.04
3939
steps:
4040
- name: Checkout source
4141
uses: actions/checkout@v3
4242

4343
# clang-format comes pre-installed
44-
# https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-Readme.md
45-
#- name: Install dependencies
46-
# run: |
47-
# sudo apt-get remove -y --purge man-db # avoid time-consuming trigger
48-
# sudo apt-get update
49-
# sudo apt-get install -y clang-format-12
44+
# https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md
5045

5146
- name: Run clang-format
52-
run: find . -type f \( -name '*.c' -o -name '*.cc' -o -name '*.cpp' -o -name '*.cxx' -o -name '*.o' -o -name '*.h' -o -name '*.hpp' -o -name '*.hxx' \) -exec clang-format-12 -style=file -i {} \;
47+
run: find . -type f \( -name '*.c' -o -name '*.cc' -o -name '*.cpp' -o -name '*.cxx' -o -name '*.o' -o -name '*.h' -o -name '*.hpp' -o -name '*.hxx' \) -exec clang-format-15 -style=file -i {} \;
5348

5449
- name: Check for changes
5550
run: git diff --exit-code

pull/tests/integration/integration_test.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,8 @@ TEST_F(BasicAuthIntegrationTest, shouldRejectWrongAuthorizationMethod) {
274274

275275
TEST_F(BasicAuthIntegrationTest, shouldRejectMalformedBase64) {
276276
std::unique_ptr<curl_slist, decltype(&curl_slist_free_all)> header(
277-
curl_slist_append(nullptr, "Authorization: Basic $"), curl_slist_free_all);
277+
curl_slist_append(nullptr, "Authorization: Basic $"),
278+
curl_slist_free_all);
278279

279280
fetchPrePerform_ = [&header](CURL* curl) {
280281
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, header.get());
@@ -286,7 +287,8 @@ TEST_F(BasicAuthIntegrationTest, shouldRejectMalformedBase64) {
286287

287288
TEST_F(BasicAuthIntegrationTest, shouldRejectMalformedBasicAuth) {
288289
std::unique_ptr<curl_slist, decltype(&curl_slist_free_all)> header(
289-
curl_slist_append(nullptr, "Authorization: Basic YWJj"), curl_slist_free_all);
290+
curl_slist_append(nullptr, "Authorization: Basic YWJj"),
291+
curl_slist_free_all);
290292

291293
fetchPrePerform_ = [&header](CURL* curl) {
292294
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, header.get());

push/tests/internal/label_encoder_test.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
#include <gtest/gtest.h>
44

5-
#include <string>
65
#include <sstream>
6+
#include <string>
77

88
namespace prometheus {
99
namespace {

0 commit comments

Comments
 (0)