Make shell/platform/{darwin|embedder}/... compatible with .clang-tidy. (flutter/engine#48160)

This commit is contained in:
Matan Lurey
2023-11-17 17:06:05 -08:00
committed by GitHub
parent 8ee0e2f7e1
commit 2b34bf3fe2
5 changed files with 21 additions and 2 deletions

View File

@@ -279,11 +279,13 @@ FLUTTER_DARWIN_EXPORT
* - FlutterStandardDataTypeFloat64: 64-bit floats
*/
typedef NS_ENUM(NSInteger, FlutterStandardDataType) {
// NOLINTBEGIN(readability-identifier-naming)
FlutterStandardDataTypeUInt8,
FlutterStandardDataTypeInt32,
FlutterStandardDataTypeInt64,
FlutterStandardDataTypeFloat32,
FlutterStandardDataTypeFloat64,
// NOLINTEND(readability-identifier-naming)
};
/**

View File

@@ -13,8 +13,11 @@
extern "C" {
#endif
// NOLINTBEGIN(google-runtime-int)
// Note: Update FlutterStandardFieldIsStandardType if this changes.
typedef enum {
// NOLINTBEGIN(readability-identifier-naming)
FlutterStandardFieldNil,
FlutterStandardFieldTrue,
FlutterStandardFieldFalse,
@@ -30,6 +33,7 @@ typedef enum {
FlutterStandardFieldList,
FlutterStandardFieldMap,
FlutterStandardFieldFloat32Data,
// NOLINTEND(readability-identifier-naming)
} FlutterStandardField;
static inline bool FlutterStandardFieldIsStandardType(uint8_t field) {
@@ -38,6 +42,7 @@ static inline bool FlutterStandardFieldIsStandardType(uint8_t field) {
}
typedef enum {
// NOLINTBEGIN(readability-identifier-naming)
FlutterStandardCodecObjcTypeNil,
FlutterStandardCodecObjcTypeNSNumber,
FlutterStandardCodecObjcTypeNSString,
@@ -46,6 +51,7 @@ typedef enum {
FlutterStandardCodecObjcTypeNSArray,
FlutterStandardCodecObjcTypeNSDictionary,
FlutterStandardCodecObjcTypeUnknown,
// NOLINTEND(readability-identifier-naming)
} FlutterStandardCodecObjcType;
///////////////////////////////////////////////////////////////////////////////
@@ -105,6 +111,8 @@ bool FlutterStandardCodecHelperWriteNumber(CFMutableDataRef data,
///@}
// NOLINTEND(google-runtime-int)
#if defined(__cplusplus)
}
#endif

View File

@@ -2263,6 +2263,8 @@ typedef struct {
#ifndef FLUTTER_ENGINE_NO_PROTOTYPES
// NOLINTBEGIN(google-objc-function-naming)
//------------------------------------------------------------------------------
/// @brief Creates the necessary data structures to launch a Flutter Dart
/// application in AOT mode. The data may only be collected after
@@ -3134,6 +3136,8 @@ FLUTTER_EXPORT
FlutterEngineResult FlutterEngineGetProcAddresses(
FlutterEngineProcTable* table);
// NOLINTEND(google-objc-function-naming)
#if defined(__cplusplus)
} // extern "C"
#endif

View File

@@ -15,6 +15,8 @@
#include "third_party/skia/include/core/SkPoint.h"
#include "third_party/skia/include/core/SkSize.h"
// NOLINTBEGIN(google-objc-function-naming)
//------------------------------------------------------------------------------
// Equality
//------------------------------------------------------------------------------
@@ -576,4 +578,6 @@ inline FlutterRoundedRect FlutterRoundedRectMake(const SkRRect& rect) {
return r;
}
// NOLINTEND(google-objc-function-naming)
#endif // FLUTTER_SHELL_PLATFORM_EMBEDDER_TESTS_EMBEDDER_ASSERTIONS_H_

View File

@@ -8,6 +8,7 @@
#define FML_USED_ON_EMBEDDER
#include <future>
#include <utility>
#include "flutter/fml/mapping.h"
#include "flutter/fml/message_loop.h"
@@ -104,8 +105,8 @@ class EmbedderTestTaskRunner {
EmbedderTestTaskRunner(fml::RefPtr<fml::TaskRunner> real_task_runner,
TaskExpiryCallback on_task_expired)
: identifier_(++sEmbedderTaskRunnerIdentifiers),
real_task_runner_(real_task_runner),
on_task_expired_(on_task_expired) {
real_task_runner_(std::move(real_task_runner)),
on_task_expired_(std::move(on_task_expired)) {
FML_CHECK(real_task_runner_);
FML_CHECK(on_task_expired_);