From 843cfd563a109848248e2e6bd56c34050eb171a4 Mon Sep 17 00:00:00 2001 From: Kirk Beitz Date: Sun, 23 Aug 2020 18:47:26 -0700 Subject: [PATCH] CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES_ERROR ===== CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES_ERROR ===== This warning is an Xcode 12 recommendation (technically, the warning is not YES_ERROR, but setting error will ensure that future changes won't regress consumers of OCMock that also set this setting). This setting will help assure modules importing OCMock that it's closure of headers is all modular, and will allow projects also setting this setting to build against OCMock without error. Inspection & testingreveals it is also available already for Xcode11. Changes to .h are the result of - setting CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES_ERROR - building - applying the fix recommended by Xcode --- Source/OCMock.xcodeproj/project.pbxproj | 2 ++ Source/OCMock/OCMLocation.h | 2 +- Source/OCMock/OCMStubRecorder.h | 5 +++-- Source/OCMock/OCMVerifier.h | 2 +- Source/OCMock/OCMock.h | 24 ++++++++++++------------ 5 files changed, 19 insertions(+), 16 deletions(-) diff --git a/Source/OCMock.xcodeproj/project.pbxproj b/Source/OCMock.xcodeproj/project.pbxproj index c4164646..ee9dbced 100644 --- a/Source/OCMock.xcodeproj/project.pbxproj +++ b/Source/OCMock.xcodeproj/project.pbxproj @@ -1713,6 +1713,7 @@ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES; @@ -1770,6 +1771,7 @@ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES; diff --git a/Source/OCMock/OCMLocation.h b/Source/OCMock/OCMLocation.h index 52f440cc..1aa6df40 100644 --- a/Source/OCMock/OCMLocation.h +++ b/Source/OCMock/OCMLocation.h @@ -15,7 +15,7 @@ */ #import -#import "OCMFunctions.h" +#import @interface OCMLocation : NSObject { diff --git a/Source/OCMock/OCMStubRecorder.h b/Source/OCMock/OCMStubRecorder.h index d735fb68..205a3a8f 100644 --- a/Source/OCMock/OCMStubRecorder.h +++ b/Source/OCMock/OCMStubRecorder.h @@ -14,8 +14,9 @@ * under the License. */ -#import "OCMRecorder.h" -#import "OCMFunctions.h" +#import +#import + #import @interface OCMStubRecorder : OCMRecorder diff --git a/Source/OCMock/OCMVerifier.h b/Source/OCMock/OCMVerifier.h index d3123d28..e53eb934 100644 --- a/Source/OCMock/OCMVerifier.h +++ b/Source/OCMock/OCMVerifier.h @@ -14,7 +14,7 @@ * under the License. */ -#import "OCMRecorder.h" +#import @class OCMLocation; @class OCMQuantifier; diff --git a/Source/OCMock/OCMock.h b/Source/OCMock/OCMock.h index 0235e811..5548859c 100644 --- a/Source/OCMock/OCMock.h +++ b/Source/OCMock/OCMock.h @@ -14,15 +14,15 @@ * under the License. */ -#import "OCMockObject.h" -#import "OCMockMacros.h" -#import "OCMRecorder.h" -#import "OCMVerifier.h" -#import "OCMStubRecorder.h" -#import "OCMConstraint.h" -#import "OCMArg.h" -#import "OCMLocation.h" -#import "OCMQuantifier.h" -#import "OCMMacroState.h" -#import "NSNotificationCenter+OCMAdditions.h" -#import "OCMFunctions.h" +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import