Skip to content

Commit cbcd60c

Browse files
committed
Enforce clang-format on web/cas and web/http_client
Bug: b/512215781
1 parent 99983dc commit cbcd60c

7 files changed

Lines changed: 16 additions & 25 deletions

File tree

base/cvd/cuttlefish/host/libs/web/cas/BUILD.bazel

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ cf_cc_library(
88
name = "cas_downloader",
99
srcs = ["cas_downloader.cpp"],
1010
hdrs = ["cas_downloader.h"],
11-
clang_format_enabled = False,
1211
deps = [
1312
"//cuttlefish/common/libs/fs",
1413
"//cuttlefish/common/libs/utils:environment",

base/cvd/cuttlefish/host/libs/web/cas/cas_downloader.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@
2828
#include <utility>
2929
#include <vector>
3030

31-
#include <android-base/expected.h>
32-
#include "absl/strings/str_join.h"
33-
#include <json/value.h>
3431
#include "absl/log/log.h"
3532
#include "absl/strings/match.h"
33+
#include "absl/strings/str_join.h"
3634
#include "absl/strings/str_split.h"
35+
#include "android-base/expected.h"
36+
#include "json/value.h"
3737

3838
#include "cuttlefish/common/libs/utils/files.h"
3939
#include "cuttlefish/common/libs/utils/json.h"
@@ -44,7 +44,6 @@
4444
#include "cuttlefish/result/result.h"
4545

4646
namespace cuttlefish {
47-
4847
namespace {
4948

5049
std::set<std::string> GetSupportedFlags(const std::string& go_binary_path) {

base/cvd/cuttlefish/host/libs/web/cas/cas_downloader.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#include <string>
2222
#include <vector>
2323

24-
#include <json/value.h>
24+
#include "json/value.h"
2525

2626
#include "cuttlefish/host/libs/web/android_build.h"
2727
#include "cuttlefish/host/libs/web/cas/cas_flags.h"

base/cvd/cuttlefish/host/libs/web/cas/cas_flags.cc

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,8 @@ CasDownloaderFlags::CasDownloaderFlags()
6161
std::vector<Flag> CasDownloaderFlags::Flags() {
6262
std::vector<Flag> flags;
6363

64-
flags.emplace_back(
65-
cas_config_filepath.Flag("cas_config_filepath")
66-
.Help("Path to the CAS downloader config file."));
64+
flags.emplace_back(cas_config_filepath.Flag("cas_config_filepath")
65+
.Help("Path to the CAS downloader config file."));
6766
flags.emplace_back(
6867
downloader_path.Flag("cas_downloader_path")
6968
.Help("Path to the CAS downloader binary. Enables CAS downloading if "
@@ -105,10 +104,9 @@ std::vector<Flag> CasDownloaderFlags::Flags() {
105104
get_capabilities_timeout.Flag("cas_get_capabilities_timeout")
106105
.Help("RPC timeout for GetCapabilities in seconds (casdownloader "
107106
"flag: get-capabilities-timeout)."));
108-
flags.emplace_back(
109-
get_tree_timeout.Flag("cas_get_tree_timeout")
110-
.Help("RPC timeout for GetTree in seconds "
111-
"(casdownloader flag: get-tree-timeout)."));
107+
flags.emplace_back(get_tree_timeout.Flag("cas_get_tree_timeout")
108+
.Help("RPC timeout for GetTree in seconds "
109+
"(casdownloader flag: get-tree-timeout)."));
112110
flags.emplace_back(
113111
batch_read_blobs_timeout.Flag("cas_batch_read_blobs_timeout")
114112
.Help("RPC timeout for BatchReadBlobs in seconds (casdownloader "
@@ -118,9 +116,8 @@ std::vector<Flag> CasDownloaderFlags::Flags() {
118116
.Help("RPC timeout for BatchUpdateBlobs in seconds (casdownloader "
119117
"flag: batch-update-blobs-timeout)."));
120118
flags.emplace_back(
121-
version.Flag("version")
122-
.Help("Print CAS downloader version information "
123-
"(casdownloader flag: version)."));
119+
version.Flag("version").Help("Print CAS downloader version information "
120+
"(casdownloader flag: version)."));
124121

125122
return flags;
126123
}

base/cvd/cuttlefish/host/libs/web/cas/cas_flags.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,7 @@ class FlagValue {
4040
private:
4141
friend struct CasDownloaderFlags;
4242

43-
Flag Flag(const std::string& name) {
44-
return GflagsCompatFlag(name, value_);
45-
}
43+
Flag Flag(const std::string& name) { return GflagsCompatFlag(name, value_); }
4644

4745
std::optional<T> value_;
4846
T default_value_;

base/cvd/cuttlefish/host/libs/web/http_client/BUILD.bazel

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ cf_cc_library(
1515
name = "curl_http_client",
1616
srcs = ["curl_http_client.cc"],
1717
hdrs = ["curl_http_client.h"],
18-
clang_format_enabled = False,
1918
deps = [
2019
"//cuttlefish/host/libs/web/http_client",
2120
"//cuttlefish/host/libs/web/http_client:scrub_secrets",

base/cvd/cuttlefish/host/libs/web/http_client/curl_http_client.cc

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@
1717

1818
#include <stdio.h>
1919

20-
#include <curl/curl.h>
21-
#include <curl/easy.h>
22-
#include <curl/header.h>
23-
2420
#include <functional>
2521
#include <memory>
2622
#include <mutex>
@@ -29,8 +25,11 @@
2925
#include <utility>
3026
#include <vector>
3127

32-
#include "absl/strings/ascii.h"
3328
#include "absl/log/log.h"
29+
#include "absl/strings/ascii.h"
30+
#include "curl/curl.h"
31+
#include "curl/easy.h"
32+
#include "curl/header.h"
3433

3534
#include "cuttlefish/host/libs/web/http_client/http_client.h"
3635
#include "cuttlefish/host/libs/web/http_client/scrub_secrets.h"

0 commit comments

Comments
 (0)