Skip to content

Commit 4b80d4f

Browse files
authored
[pigeon]enable treat warning as errors for swift code in unit test (#3889)
This will make it easier to spot issues where we accidentally create an "implicit optional". For more details about why implicit optional is bad, see #3658 For example, the following warning was ignored previously: ![Screenshot 2023-04-06 at 4 15 07 PM](https://user-images.githubusercontent.com/41930132/235790274-776f096a-212c-445b-ae81-f748b143f982.png) *List which issues are fixed by this PR. You must list at least one issue.* Mentioned in PR: #3658 (comment) *If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].*
1 parent b9f2f1e commit 4b80d4f

File tree

1 file changed

+3
-0
lines changed
  • packages/pigeon/platform_tests/test_plugin/example/ios/Runner.xcodeproj

1 file changed

+3
-0
lines changed

packages/pigeon/platform_tests/test_plugin/example/ios/Runner.xcodeproj/project.pbxproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -542,6 +542,7 @@
542542
PRODUCT_NAME = "$(TARGET_NAME)";
543543
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
544544
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
545+
SWIFT_TREAT_WARNINGS_AS_ERRORS = YES;
545546
SWIFT_VERSION = 5.0;
546547
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
547548
};
@@ -557,6 +558,7 @@
557558
MARKETING_VERSION = 1.0;
558559
PRODUCT_BUNDLE_IDENTIFIER = dev.flutter.plugins.RunnerTests;
559560
PRODUCT_NAME = "$(TARGET_NAME)";
561+
SWIFT_TREAT_WARNINGS_AS_ERRORS = YES;
560562
SWIFT_VERSION = 5.0;
561563
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
562564
};
@@ -572,6 +574,7 @@
572574
MARKETING_VERSION = 1.0;
573575
PRODUCT_BUNDLE_IDENTIFIER = dev.flutter.plugins.RunnerTests;
574576
PRODUCT_NAME = "$(TARGET_NAME)";
577+
SWIFT_TREAT_WARNINGS_AS_ERRORS = YES;
575578
SWIFT_VERSION = 5.0;
576579
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
577580
};

0 commit comments

Comments
 (0)