Skip to content

Commit

Permalink
A round of leftover manual fixes and ignores
Browse files Browse the repository at this point in the history
  • Loading branch information
yarikoptic committed Jun 10, 2024
1 parent 335364d commit a88c890
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/engine/QueryPlanner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1161,8 +1161,8 @@ void QueryPlanner::applyTextLimitsIfPossible(
if (((plan._idsOfIncludedNodes &
textLimit.idsOfMustBeFinishedOperations_) ^
textLimit.idsOfMustBeFinishedOperations_) != 0) {
// Ther is still an operation that needs to be finished before this text
// limit can be applied
// There is still an operation that needs to be finished before this
// text limit can be applied
i++;
continue;
}
Expand Down
2 changes: 1 addition & 1 deletion src/index/PrefixHeuristic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ std::pair<size_t, TreeNode*> TreeNode::getMaximum(size_t codelength) {

_score = _sharedCount * relevantLength;

// Check if our own score is greater than any of the childrens
// Check if our own score is greater than any of the children
// we choose >= so we get a valid pointer when there is only the root with
// score 0 left.
if (_score >= maxScore) {
Expand Down
4 changes: 2 additions & 2 deletions src/util/PriorityQueue.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ class TreeBasedPQ {
/**
* Update the key of a value in the HeapBasedPQ
* @param newKey
* @param handle inout parameter, will be changed to be a valid handle after
* @param handle in/out parameter, will be changed to be a valid handle after
* the operation has finished.
* @throws NotInPQException if the handle does not point into the PQ (because
* of pop or erase operations)
Expand Down Expand Up @@ -370,7 +370,7 @@ class HeapBasedPQ {
* associated with the handle
*
* @param newKey
* @param handle Inout parameter: Updated s.t. it stays valid.
* @param handle in/out parameter: Updated s.t. it stays valid.
* @throws NotInPQException if the handle does not point into the PQ (because
* of pop or erase operations)
*/
Expand Down
6 changes: 4 additions & 2 deletions test/AlgorithmTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ TEST(Algorithm, Contains) {
std::vector<std::string> substrings{"h", "a", "l", "ha", "al", "hal"};
ASSERT_TRUE(std::ranges::all_of(
substrings, [&s](const auto& el) { return contains(s, el); }));
std::vector<std::string> noSubstrings{"x", "hl", "hel"};
std::vector<std::string> noSubstrings{"x", "hl",
"hel"}; // codespell-ignore
ASSERT_TRUE(std::ranges::none_of(
noSubstrings, [&s](const auto& el) { return contains(s, el); }));
}
Expand All @@ -40,7 +41,8 @@ TEST(Algorithm, Contains) {
"ha", "al", "hal"};
ASSERT_TRUE(std::ranges::all_of(
substrings, [&s](const auto& el) { return contains(s, el); }));
std::vector<std::string_view> noSubstrings{"x", "hl", "hel"};
std::vector<std::string_view> noSubstrings{"x", "hl",
"hel"}; // codespell-ignore
ASSERT_TRUE(std::ranges::none_of(
noSubstrings, [&s](const auto& el) { return contains(s, el); }));
}
Expand Down
4 changes: 2 additions & 2 deletions test/PriorityQueueTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,11 @@ TEST(PqTest, TreeUpdateReinsert) {
ASSERT_EQ(pq.size(), 0ul);
ASSERT_THROW(pq.updateKey(15, &h), ad_utility::NotInPQException);
ASSERT_EQ(pq.size(), 0ul);
auto h2 = pq.insert(500, "alot"s);
auto h2 = pq.insert(500, "alot"s); // codespell-ignore
ASSERT_EQ(pq.size(), 1ul);
h = pq.pop();
ASSERT_EQ(h.score(), 500);
ASSERT_EQ(h.value(), "alot"s);
ASSERT_EQ(h.value(), "alot"s); // codespell-ignore
};
TreeBasedPQ<int, string> pq;
test(pq);
Expand Down
2 changes: 1 addition & 1 deletion test/StringUtilsTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,6 @@ TEST(StringUtilsTest, findLiteralEnd) {
using namespace ad_utility;
EXPECT_EQ(findLiteralEnd("nothing", "\""), std::string_view::npos);
EXPECT_EQ(findLiteralEnd("no\"thing", "\""), 2u);
EXPECT_EQ(findLiteralEnd("no\\\"thi\"ng", "\""), 7u);
EXPECT_EQ(findLiteralEnd("no\\\"thi\"ng", "\""), 7u); // codespell-ignore
EXPECT_EQ(findLiteralEnd("no\\\\\"thing", "\""), 4u);
}

0 comments on commit a88c890

Please sign in to comment.