Skip to content

Commit 70d0473

Browse files
authored
Mechanical fixes by CI automation. (#17)
* emulator: mechanical formatting fixes by ci tool. * emulator: make clang-tidy happy.
1 parent 6db78d1 commit 70d0473

4 files changed

Lines changed: 11 additions & 12 deletions

File tree

google/cloud/bigtable/emulator/column_family.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,7 @@ StatusOr<ReadModifyWriteCellResult> ColumnRow::ReadModifyWrite(
5757
auto latest_it = latest(cells_);
5858

5959
auto maybe_old_value =
60-
google::cloud::internal::DecodeBigEndian<std::int64_t>(
61-
latest_it->second);
60+
google::cloud::internal::DecodeBigEndian<std::int64_t>(latest_it->second);
6261
if (!maybe_old_value) {
6362
return maybe_old_value.status();
6463
}

google/cloud/bigtable/emulator/column_family.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,10 @@ class ColumnRow {
7171
ColumnRow(ColumnRow const&) = delete;
7272
ColumnRow& operator=(ColumnRow const&) = delete;
7373

74-
7574
StatusOr<ReadModifyWriteCellResult> ReadModifyWrite(std::int64_t inc_value);
7675

7776
ReadModifyWriteCellResult ReadModifyWrite(std::string const& append_value);
7877

79-
8078
/**
8179
* Insert or update and existing cell at a given timestamp.
8280
*
@@ -113,8 +111,7 @@ class ColumnRow {
113111
bool HasCells() const { return !cells_.empty(); }
114112
using const_iterator =
115113
std::map<std::chrono::milliseconds, std::string>::const_iterator;
116-
using iterator =
117-
std::map<std::chrono::milliseconds, std::string>::iterator;
114+
using iterator = std::map<std::chrono::milliseconds, std::string>::iterator;
118115
const_iterator begin() const { return cells_.begin(); }
119116
const_iterator end() const { return cells_.end(); }
120117
iterator begin() { return cells_.begin(); }

google/cloud/bigtable/emulator/rollback_test.cc

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -346,12 +346,13 @@ TEST(TransactonRollback, ZeroOrNegativeTimestampHandling) {
346346
{column_family_name, column_qualifier, -1, data},
347347
};
348348
auto const* const row_key_5 = "4";
349-
auto system_time_ms_before = std::chrono::duration_cast<std::chrono::milliseconds>(
350-
std::chrono::system_clock::now().time_since_epoch());
349+
auto system_time_ms_before =
350+
std::chrono::duration_cast<std::chrono::milliseconds>(
351+
std::chrono::system_clock::now().time_since_epoch());
351352
status = SetCells(table, table_name, row_key_5, v);
352353
ASSERT_STATUS_OK(status);
353-
auto column_or = GetColumn(
354-
table, v[0].column_family_name, row_key_5, v[0].column_qualifier);
354+
auto column_or = GetColumn(table, v[0].column_family_name, row_key_5,
355+
v[0].column_qualifier);
355356
ASSERT_STATUS_OK(column_or.status());
356357
auto col = column_or.value();
357358
ASSERT_EQ(col.size(), 1);

google/cloud/bigtable/emulator/table.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ Status Table::MutateRow(google::bigtable::v2::MutateRowRequest const& request) {
232232
request.mutations());
233233
}
234234

235+
// NOLINTBEGIN(readability-function-cognitive-complexity)
235236
Status Table::DoMutationsWithPossibleRollback(
236237
std::string const& row_key,
237238
google::protobuf::RepeatedPtrField<google::bigtable::v2::Mutation> const&
@@ -300,6 +301,7 @@ Status Table::DoMutationsWithPossibleRollback(
300301

301302
return Status();
302303
}
304+
// NOLINTEND(readability-function-cognitive-complexity)
303305

304306
StatusOr<CellStream> Table::CreateCellStream(
305307
std::shared_ptr<StringRangeSet> range_set,
@@ -556,7 +558,6 @@ Table::ReadModifyWriteRow(
556558
return std::move(maybe_response.value());
557559
}
558560

559-
560561
// NOLINTBEGIN(readability-convert-member-functions-to-static)
561562
Status RowTransaction::AddToCell(
562563
::google::bigtable::v2::Mutation_AddToCell const& add_to_cell) {
@@ -726,7 +727,8 @@ void ProcessReadModifyWriteResult(
726727
// Record the cell in our local mini table here to use in
727728
// assembling a row of changed cells for return.
728729
tmp_families[rule.family_name()].SetCell(row_key, rule.column_qualifier(),
729-
result.timestamp, std::move(result.value));
730+
result.timestamp,
731+
std::move(result.value));
730732
}
731733

732734
// NOLINTBEGIN(readability-function-cognitive-complexity)

0 commit comments

Comments
 (0)