Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firestore: Remove obsolete NOLINT comments #14347

Merged
merged 4 commits into from
Jan 20, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Firestore/core/include/firebase/firestore/timestamp.h
Original file line number Diff line number Diff line change
@@ -23,8 +23,8 @@
#include <string>

#if !defined(_STLPORT_VERSION)
#include <chrono> // NOLINT(build/c++11)
#endif // !defined(_STLPORT_VERSION)
#include <chrono>
#endif // !defined(_STLPORT_VERSION)

namespace firebase {

2 changes: 1 addition & 1 deletion Firestore/core/src/api/document_reference.cc
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@

#include "Firestore/core/src/api/document_reference.h"

#include <future> // NOLINT(build/c++11)
#include <future>
#include <memory>

#include "Firestore/core/src/api/collection_reference.h"
2 changes: 1 addition & 1 deletion Firestore/core/src/api/firestore.h
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@
#define FIRESTORE_CORE_SRC_API_FIRESTORE_H_

#include <memory>
#include <mutex> // NOLINT(build/c++11)
#include <mutex>
#include <string>

#include "Firestore/core/src/api/api_fwd.h"
2 changes: 1 addition & 1 deletion Firestore/core/src/api/load_bundle_task.cc
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@

#include "Firestore/core/src/api/load_bundle_task.h"

#include <mutex> // NOLINT(build/c++11)
#include <mutex>
#include <utility>

#include "Firestore/core/src/util/autoid.h"
2 changes: 1 addition & 1 deletion Firestore/core/src/api/load_bundle_task.h
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@
#include <cstdint>
#include <functional>
#include <memory>
#include <mutex> // NOLINT(build/c++11)
#include <mutex>
#include <string>
#include <utility>
#include <vector>
2 changes: 1 addition & 1 deletion Firestore/core/src/api/query_core.cc
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@

#include "Firestore/core/src/api/query_core.h"

#include <future> // NOLINT(build/c++11)
#include <future>
#include <memory>
#include <utility>
#include <vector>
2 changes: 1 addition & 1 deletion Firestore/core/src/core/event_listener.h
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@
#define FIRESTORE_CORE_SRC_CORE_EVENT_LISTENER_H_

#include <memory>
#include <mutex> // NOLINT(build/c++11)
#include <mutex>
#include <utility>

#include "Firestore/core/src/util/executor.h"
2 changes: 1 addition & 1 deletion Firestore/core/src/core/firestore_client.cc
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@
#include "Firestore/core/src/core/firestore_client.h"

#include <functional>
#include <future> // NOLINT(build/c++11)
#include <future>
#include <memory>
#include <string>
#include <utility>
Original file line number Diff line number Diff line change
@@ -24,7 +24,7 @@
#import <Foundation/Foundation.h>

#include <memory>
#include <mutex> // NOLINT(build/c++11)
#include <mutex>
#include <string>
#include <utility>

Original file line number Diff line number Diff line change
@@ -24,7 +24,7 @@
#import <Foundation/Foundation.h>

#include <memory>
#include <mutex> // NOLINT(build/c++11)
#include <mutex>
#include <utility>

#include "Firestore/core/src/credentials/credentials_provider.h"
2 changes: 1 addition & 1 deletion Firestore/core/src/local/leveldb_remote_document_cache.cc
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@
#include "Firestore/core/src/local/leveldb_remote_document_cache.h"

#include <string>
#include <thread> // NOLINT(build/c++11)
#include <thread>
#include <utility>

#include "Firestore/Protos/nanopb/firestore/local/maybe_document.nanopb.h"
2 changes: 1 addition & 1 deletion Firestore/core/src/local/leveldb_remote_document_cache.h
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@

#include <memory>
#include <string>
#include <thread> // NOLINT(build/c++11)
#include <thread>
#include <vector>

#include "Firestore/core/src/core/query.h"
2 changes: 1 addition & 1 deletion Firestore/core/src/local/lru_garbage_collector.cc
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@

#include "Firestore/core/src/local/lru_garbage_collector.h"

#include <chrono> // NOLINT(build/c++11)
#include <chrono>
#include <queue>
#include <string>
#include <utility>
2 changes: 1 addition & 1 deletion Firestore/core/src/remote/exponential_backoff.h
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@
#ifndef FIRESTORE_CORE_SRC_REMOTE_EXPONENTIAL_BACKOFF_H_
#define FIRESTORE_CORE_SRC_REMOTE_EXPONENTIAL_BACKOFF_H_

#include <chrono> // NOLINT(build/c++11)
#include <chrono>
#include <memory>

#include "Firestore/core/src/util/async_queue.h"
4 changes: 2 additions & 2 deletions Firestore/core/src/remote/grpc_completion.h
Original file line number Diff line number Diff line change
@@ -17,9 +17,9 @@
#ifndef FIRESTORE_CORE_SRC_REMOTE_GRPC_COMPLETION_H_
#define FIRESTORE_CORE_SRC_REMOTE_GRPC_COMPLETION_H_

#include <chrono> // NOLINT(build/c++11)
#include <chrono>
#include <functional>
#include <future> // NOLINT(build/c++11)
#include <future>
#include <memory>
#include <utility>

2 changes: 1 addition & 1 deletion Firestore/core/src/remote/grpc_connection.cc
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@
#include <cstdlib>

#include <algorithm>
#include <mutex> // NOLINT(build/c++11)
#include <mutex>
#include <string>
#include <utility>

4 changes: 2 additions & 2 deletions Firestore/core/src/remote/grpc_stream.cc
Original file line number Diff line number Diff line change
@@ -16,8 +16,8 @@

#include "Firestore/core/src/remote/grpc_stream.h"

#include <chrono> // NOLINT(build/c++11)
#include <future> // NOLINT(build/c++11)
#include <chrono>
#include <future>

#include "Firestore/core/src/remote/grpc_connection.h"
#include "Firestore/core/src/remote/grpc_util.h"
2 changes: 1 addition & 1 deletion Firestore/core/src/remote/online_state_tracker.cc
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@

#include "Firestore/core/src/remote/online_state_tracker.h"

#include <chrono> // NOLINT(build/c++11)
#include <chrono>

#include "Firestore/core/src/util/executor.h"
#include "Firestore/core/src/util/hard_assert.h"
2 changes: 1 addition & 1 deletion Firestore/core/src/remote/stream.cc
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@

#include "Firestore/core/src/remote/stream.h"

#include <chrono> // NOLINT(build/c++11)
#include <chrono>
#include <utility>

#include "Firestore/core/include/firebase/firestore/firestore_errors.h"
4 changes: 2 additions & 2 deletions Firestore/core/src/util/async_queue.h
Original file line number Diff line number Diff line change
@@ -18,10 +18,10 @@
#define FIRESTORE_CORE_SRC_UTIL_ASYNC_QUEUE_H_

#include <atomic>
#include <chrono> // NOLINT(build/c++11)
#include <chrono>
#include <functional>
#include <memory>
#include <mutex> // NOLINT(build/c++11)
#include <mutex>
#include <vector>

#include "Firestore/core/src/util/executor.h"
4 changes: 2 additions & 2 deletions Firestore/core/src/util/background_queue.h
Original file line number Diff line number Diff line change
@@ -17,9 +17,9 @@
#ifndef FIRESTORE_CORE_SRC_UTIL_BACKGROUND_QUEUE_H_
#define FIRESTORE_CORE_SRC_UTIL_BACKGROUND_QUEUE_H_

#include <condition_variable> // NOLINT(build/c++11)
#include <condition_variable>
#include <functional>
#include <mutex> // NOLINT(build/c++11)
#include <mutex>

namespace firebase {
namespace firestore {
2 changes: 1 addition & 1 deletion Firestore/core/src/util/executor.h
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@
#ifndef FIRESTORE_CORE_SRC_UTIL_EXECUTOR_H_
#define FIRESTORE_CORE_SRC_UTIL_EXECUTOR_H_

#include <chrono> // NOLINT(build/c++11)
#include <chrono>
#include <functional>
#include <memory>
#include <string>
6 changes: 3 additions & 3 deletions Firestore/core/src/util/executor_libdispatch.h
Original file line number Diff line number Diff line change
@@ -19,11 +19,11 @@

#include <dispatch/dispatch.h>

#include <chrono> // NOLINT(build/c++11)
#include <condition_variable> // NOLINT(build/c++11)
#include <chrono>
#include <condition_variable>
#include <functional>
#include <memory>
#include <mutex> // NOLINT(build/c++11)
#include <mutex>
#include <string>
#include <unordered_map>
#include <unordered_set>
2 changes: 1 addition & 1 deletion Firestore/core/src/util/executor_std.cc
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@

#include "Firestore/core/src/util/executor_std.h"

#include <future> // NOLINT(build/c++11)
#include <future>
#include <memory>
#include <sstream>

6 changes: 3 additions & 3 deletions Firestore/core/src/util/executor_std.h
Original file line number Diff line number Diff line change
@@ -19,12 +19,12 @@

#include <algorithm>
#include <atomic>
#include <condition_variable> // NOLINT(build/c++11)
#include <condition_variable>
#include <deque>
#include <memory>
#include <mutex> // NOLINT(build/c++11)
#include <mutex>
#include <string>
#include <thread> // NOLINT(build/c++11)
#include <thread>
#include <utility>
#include <vector>

4 changes: 2 additions & 2 deletions Firestore/core/src/util/schedule.h
Original file line number Diff line number Diff line change
@@ -18,9 +18,9 @@
#define FIRESTORE_CORE_SRC_UTIL_SCHEDULE_H_

#include <algorithm>
#include <condition_variable> // NOLINT(build/c++11)
#include <condition_variable>
#include <deque>
#include <mutex> // NOLINT(build/c++11)
#include <mutex>
#include <vector>

#include "Firestore/core/src/util/executor.h"
2 changes: 1 addition & 1 deletion Firestore/core/src/util/task.cc
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@

#include "Firestore/core/src/util/task.h"

#include <chrono> // NOLINT(build/c++11)
#include <chrono>
#include <cstdint>
#include <utility>

6 changes: 3 additions & 3 deletions Firestore/core/src/util/task.h
Original file line number Diff line number Diff line change
@@ -18,10 +18,10 @@
#define FIRESTORE_CORE_SRC_UTIL_TASK_H_

#include <atomic>
#include <condition_variable> // NOLINT(build/c++11)
#include <condition_variable>
#include <memory>
#include <mutex> // NOLINT(build/c++11)
#include <thread> // NOLINT(build/c++11)
#include <mutex>
#include <thread>

#include "Firestore/core/src/util/executor.h"

2 changes: 1 addition & 1 deletion Firestore/core/src/util/testing_hooks.cc
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@
#include "Firestore/core/src/util/testing_hooks.h"

#include <functional>
#include <mutex> // NOLINT(build/c++11)
#include <mutex>
#include <type_traits>
#include <unordered_map>
#include <utility>
2 changes: 1 addition & 1 deletion Firestore/core/src/util/testing_hooks.h
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@

#include <functional>
#include <memory>
#include <mutex> // NOLINT(build/c++11)
#include <mutex>
#include <string>
#include <unordered_map>

2 changes: 1 addition & 1 deletion Firestore/core/src/util/thread_safe_memoizer.h
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@
#define FIRESTORE_CORE_SRC_UTIL_THREAD_SAFE_MEMOIZER_H_

#include <functional>
#include <mutex> // NOLINT(build/c++11)
#include <mutex>
#include <vector>

namespace firebase {
6 changes: 3 additions & 3 deletions Firestore/core/test/unit/api/load_bundle_task_test.cc
Original file line number Diff line number Diff line change
@@ -14,10 +14,10 @@
* limitations under the License.
*/

#include <chrono> // NOLINT(build/c++11)
#include <mutex> // NOLINT(build/c++11)
#include <chrono>
#include <mutex>
#include <queue>
#include <thread> // NOLINT(build/c++11)
#include <thread>

#include "Firestore/core/include/firebase/firestore/firestore_errors.h"
#include "Firestore/core/src/api/load_bundle_task.h"
2 changes: 1 addition & 1 deletion Firestore/core/test/unit/core/query_listener_test.cc
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@

#include "Firestore/core/src/core/query_listener.h"

#include <future> // NOLINT(build/c++11)
#include <future>
#include <memory>
#include <utility>
#include <vector>
Original file line number Diff line number Diff line change
@@ -18,8 +18,8 @@

#import <FirebaseAppCheckInterop/FirebaseAppCheckInterop.h>

#include <chrono> // NOLINT(build/c++11)
#include <future> // NOLINT(build/c++11)
#include <chrono>
#include <future>

#import "FirebaseCore/Extension/FIRAppInternal.h"

Original file line number Diff line number Diff line change
@@ -16,8 +16,8 @@

#include "Firestore/core/src/credentials/firebase_auth_credentials_provider_apple.h"

#include <chrono> // NOLINT(build/c++11)
#include <future> // NOLINT(build/c++11)
#include <chrono>
#include <future>
#include <memory>

#import "FirebaseAuth/Interop/Public/FirebaseAuthInterop/FIRAuthInterop.h"
2 changes: 1 addition & 1 deletion Firestore/core/test/unit/local/local_store_test.cc
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@

#include "Firestore/core/test/unit/local/local_store_test.h"

#include <thread> // NOLINT(build/c++11)
#include <thread>
#include <unordered_map>
#include <utility>
#include <vector>
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@

#include "Firestore/core/src/remote/exponential_backoff.h"

#include <chrono> // NOLINT(build/c++11)
#include <chrono>

#include "Firestore/core/src/util/async_queue.h"
#include "Firestore/core/src/util/executor.h"
2 changes: 1 addition & 1 deletion Firestore/core/test/unit/remote/grpc_stream_tester.h
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@
#define FIRESTORE_CORE_TEST_UNIT_REMOTE_GRPC_STREAM_TESTER_H_

#include <functional>
#include <future> // NOLINT(build/c++11)
#include <future>
#include <initializer_list>
#include <memory>
#include <string>
8 changes: 4 additions & 4 deletions Firestore/core/test/unit/testutil/async_testing.h
Original file line number Diff line number Diff line change
@@ -17,12 +17,12 @@
#ifndef FIRESTORE_CORE_TEST_UNIT_TESTUTIL_ASYNC_TESTING_H_
#define FIRESTORE_CORE_TEST_UNIT_TESTUTIL_ASYNC_TESTING_H_

#include <chrono> // NOLINT(build/c++11)
#include <chrono>
#include <functional>
#include <future> // NOLINT(build/c++11)
#include <future>
#include <memory>
#include <mutex> // NOLINT(build/c++11)
#include <thread> // NOLINT(build/c++11)
#include <mutex>
#include <thread>
#include <utility>
#include <vector>

2 changes: 1 addition & 1 deletion Firestore/core/test/unit/testutil/testutil.cc
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@
#include "Firestore/core/test/unit/testutil/testutil.h"

#include <algorithm>
#include <chrono> // NOLINT(build/c++11)
#include <chrono>
#include <set>

#include "Firestore/core/include/firebase/firestore/geo_point.h"
2 changes: 1 addition & 1 deletion Firestore/core/test/unit/testutil/time_testing.h
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@
#ifndef FIRESTORE_CORE_TEST_UNIT_TESTUTIL_TIME_TESTING_H_
#define FIRESTORE_CORE_TEST_UNIT_TESTUTIL_TIME_TESTING_H_

#include <chrono> // NOLINT(build/c++11)
#include <chrono>

#include "Firestore/core/include/firebase/firestore/timestamp.h"

4 changes: 2 additions & 2 deletions Firestore/core/test/unit/util/async_queue_test.cc
Original file line number Diff line number Diff line change
@@ -16,8 +16,8 @@

#include "Firestore/core/test/unit/util/async_queue_test.h"

#include <chrono> // NOLINT(build/c++11)
#include <future> // NOLINT(build/c++11)
#include <chrono>
#include <future>
#include <string>

#include "Firestore/core/src/util/executor.h"
9 changes: 5 additions & 4 deletions Firestore/core/test/unit/util/executor_test.cc
Original file line number Diff line number Diff line change
@@ -16,12 +16,13 @@

#include "Firestore/core/test/unit/util/executor_test.h"

#include <chrono> // NOLINT(build/c++11)
#include <condition_variable> // NOLINT(build/c++11)
#include <cstdlib>
#include <future> // NOLINT(build/c++11)

#include <chrono>
#include <condition_variable>
#include <future>
#include <string>
#include <thread> // NOLINT(build/c++11)
#include <thread>

#include "Firestore/core/src/util/executor.h"
#include "Firestore/core/src/util/task.h"
3 changes: 2 additions & 1 deletion Firestore/core/test/unit/util/schedule_test.cc
Original file line number Diff line number Diff line change
@@ -16,8 +16,9 @@

#include "Firestore/core/src/util/schedule.h"

#include <chrono> // NOLINT(build/c++11)
#include <cstdlib>

#include <chrono>
#include <string>

#include "Firestore/core/src/util/task.h"
2 changes: 1 addition & 1 deletion Firestore/core/test/unit/util/task_test.cc
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@

#include "Firestore/core/src/util/task.h"

#include <chrono> // NOLINT(build/c++11)
#include <chrono>

#include "Firestore/core/src/util/defer.h"
#include "Firestore/core/src/util/hard_assert.h"
8 changes: 4 additions & 4 deletions Firestore/core/test/unit/util/testing_hooks_test.cc
Original file line number Diff line number Diff line change
@@ -16,11 +16,11 @@

#include "Firestore/core/src/util/testing_hooks.h"

#include <chrono> // NOLINT(build/c++11)
#include <future> // NOLINT(build/c++11)
#include <chrono>
#include <future>
#include <memory>
#include <string>
#include <thread> // NOLINT(build/c++11)
#include <thread>

#include "Firestore/core/src/api/listener_registration.h"
#include "Firestore/core/src/nanopb/byte_string.h"
@@ -34,7 +34,7 @@

namespace {

using namespace std::chrono_literals; // NOLINT(build/namespaces)
using namespace std::chrono_literals;

using firebase::firestore::api::ListenerRegistration;
using firebase::firestore::nanopb::ByteString;
2 changes: 1 addition & 1 deletion Firestore/core/test/unit/util/thread_safe_memoizer_test.cc
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@

#include "Firestore/core/src/util/thread_safe_memoizer.h"

#include <thread> // NOLINT(build/c++11)
#include <thread>
#include "gtest/gtest.h"

namespace firebase {
4 changes: 0 additions & 4 deletions scripts/cpplint.py
Original file line number Diff line number Diff line change
@@ -269,9 +269,6 @@
# here! cpplint_unittest.py should tell you if you forget to do this.
_ERROR_CATEGORIES = [
'build/class',
'build/c++11',
'build/c++14',
'build/c++tr1',
'build/deprecated',
'build/endif_comment',
'build/explicit_make_pair',
@@ -283,7 +280,6 @@
'build/include_order',
'build/include_what_you_use',
'build/namespaces_headers',
'build/namespaces_literals',
'build/namespaces',
'build/printf_format',
'build/storage_class',

Unchanged files with check annotations Beta

}
int LocalStore::Backfill() const {
return persistence_->Run("Backfill Indexes", [&] {

Check warning on line 589 in Firestore/core/src/local/local_store.cc

GitHub Actions / spm-source (macos-15, Xcode_16, catalyst)

implicit conversion loses integer precision: 'typename std::enable_if<!std::is_same<void, decltype(block())>::value, decltype(block())>::type' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]

Check warning on line 589 in Firestore/core/src/local/local_store.cc

GitHub Actions / spm-source (macos-15, Xcode_16, visionOS)

implicit conversion loses integer precision: 'typename std::enable_if<!std::is_same<void, decltype(block())>::value, decltype(block())>::type' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]

Check warning on line 589 in Firestore/core/src/local/local_store.cc

GitHub Actions / spm-source (macos-15, Xcode_16, tvOS)

implicit conversion loses integer precision: 'typename std::enable_if<!std::is_same<void, decltype(block())>::value, decltype(block())>::type' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]

Check warning on line 589 in Firestore/core/src/local/local_store.cc

GitHub Actions / spm-source (macos-15, Xcode_16, iOS)

implicit conversion loses integer precision: 'typename std::enable_if<!std::is_same<void, decltype(block())>::value, decltype(block())>::type' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]

Check warning on line 589 in Firestore/core/src/local/local_store.cc

GitHub Actions / spm-source (macos-14, Xcode_15.4, iOS)

implicit conversion loses integer precision: 'typename std::enable_if<!std::is_same<void, decltype(block())>::value, decltype(block())>::type' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]

Check warning on line 589 in Firestore/core/src/local/local_store.cc

GitHub Actions / spm-source (macos-13, Xcode_15.2, iOS)

implicit conversion loses integer precision: 'typename std::enable_if<!std::is_same<void, decltype(block())>::value, decltype(block())>::type' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
return index_backfiller_->WriteIndexEntries(this);
});
}