-
Notifications
You must be signed in to change notification settings - Fork 8
/
XcodeWarnings.xcconfig
129 lines (116 loc) · 4.63 KB
/
XcodeWarnings.xcconfig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
// XcodeWarnings by Jon Reid, https://qualitycoding.org/
// Copyright 2019 Jonathan M. Reid. See LICENSE.txt
// Source: https://github.com/jonreid/XcodeWarnings
// Apple Clang - Preprocessing
ENABLE_STRICT_OBJC_MSGSEND = YES
GCC_ENABLE_TRIGRAPHS = NO
// Apple Clang - Undefined Behavior Sanitizer
CLANG_UNDEFINED_BEHAVIOR_SANITIZER_INTEGER = YES
CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES
CLANG_ADDRESS_SANITIZER_CONTAINER_OVERFLOW = YES
// CLANG_ANALYZER_SECURITY_BUFFER_OVERFLOW_EXPERIMENTAL = YES // Currently causes an error
// Apple Clang - Warning Policies
//GCC_TREAT_WARNINGS_AS_ERRORS = YES
//GCC_WARN_PEDANTIC = YES
// Apple Clang - Warnings - All languages
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES
GCC_WARN_CHECK_SWITCH_STATEMENTS = YES
GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES
CLANG_WARN_DOCUMENTATION_COMMENTS = YES
CLANG_WARN_EMPTY_BODY = YES
GCC_WARN_FOUR_CHARACTER_CONSTANTS = YES
GCC_WARN_SHADOW = YES
CLANG_WARN_BOOL_CONVERSION = YES
CLANG_WARN_CONSTANT_CONVERSION = YES
GCC_WARN_64_TO_32_BIT_CONVERSION = YES
CLANG_WARN_ENUM_CONVERSION = YES
CLANG_WARN_FLOAT_CONVERSION = YES
CLANG_WARN_INT_CONVERSION = YES
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES
CLANG_WARN_IMPLICIT_SIGN_CONVERSION = YES
CLANG_WARN_INFINITE_RECURSION = YES
GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR
GCC_WARN_MISSING_PARENTHESES = YES
GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES
GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES
GCC_WARN_ABOUT_MISSING_NEWLINE = YES
CLANG_WARN_ASSIGN_ENUM = YES
GCC_WARN_ABOUT_POINTER_SIGNEDNESS = YES
CLANG_WARN_SEMICOLON_BEFORE_METHOD_BODY = YES
GCC_WARN_SIGN_COMPARE = YES
CLANG_WARN_STRICT_PROTOTYPES = YES
CLANG_WARN_COMMA = YES
CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES
GCC_TREAT_INCOMPATIBLE_POINTER_TYPE_WARNINGS_AS_ERRORS = YES
GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES
GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE
GCC_WARN_UNKNOWN_PRAGMAS = YES
CLANG_WARN_UNREACHABLE_CODE = YES_AGGRESSIVE
GCC_WARN_UNUSED_FUNCTION = YES
GCC_WARN_UNUSED_LABEL = YES
//GCC_WARN_UNUSED_PARAMETER = YES
GCC_WARN_UNUSED_VALUE = YES
GCC_WARN_UNUSED_VARIABLE = YES
CLANG_WARN_NULLABLE_TO_NONNULL_CONVERSION = YES
// Apple Clang - Warnings - C++
CLANG_WARN__EXIT_TIME_DESTRUCTORS = YES
GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES
GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = YES
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES
CLANG_WARN_SUSPICIOUS_MOVE = YES
GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO = YES
CLANG_WARN_CXX0X_EXTENSIONS = YES
// Apple Clang - Warnings - Objective-C
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES
CLANG_WARN_OBJC_IMPLICIT_ATOMIC_PROPERTIES = YES
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES
GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL = YES
CLANG_WARN_OBJC_INTERFACE_IVARS = YES
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES
GCC_WARN_STRICT_SELECTOR_MATCH = YES
GCC_WARN_UNDECLARED_SELECTOR = YES
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR
// Apple LLVM 9.0 - Warnings - Objective-C and ARC
CLANG_WARN_OBJC_EXPLICIT_OWNERSHIP_TYPE = YES
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES
CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES_AGGRESSIVE
CLANG_WARN__ARC_BRIDGE_CAST_NONARC = YES
// Static Analyzer - Analysis Policy
RUN_CLANG_STATIC_ANALYZER = YES
CLANG_STATIC_ANALYZER_MODE_ON_ANALYZE_ACTION = Deep
CLANG_STATIC_ANALYZER_MODE = Deep
// Static Analyzer - Generic Issues
CLANG_ANALYZER_DEADCODE_DEADSTORES = YES
CLANG_ANALYZER_MEMORY_MANAGEMENT = YES
CLANG_ANALYZER_NONNULL = YES
// Static Analyzer - Issues - Apple APIs
CLANG_ANALYZER_OBJC_NSCFERROR = YES
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES
CLANG_ANALYZER_LOCALIZABILITY_EMPTY_CONTEXT = YES
CLANG_ANALYZER_OBJC_COLLECTIONS = YES
CLANG_ANALYZER_GCD = YES
CLANG_ANALYZER_GCD_PERFORMANCE = YES
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE
// Static Analyzer - Issues - Objective-C
CLANG_ANALYZER_OBJC_ATSYNC = YES
CLANG_ANALYZER_OBJC_DEALLOC = YES
CLANG_ANALYZER_OBJC_INCOMP_METHOD_TYPES = YES
CLANG_ANALYZER_OBJC_GENERICS = YES
CLANG_ANALYZER_OBJC_UNUSED_IVARS = YES
CLANG_ANALYZER_OBJC_SELF_INIT = YES
CLANG_ANALYZER_OBJC_RETAIN_COUNT = YES
// Static Analyzer - Issues - Security
CLANG_ANALYZER_SECURITY_FLOATLOOPCOUNTER = YES
CLANG_ANALYZER_SECURITY_KEYCHAIN_API = YES
CLANG_ANALYZER_SECURITY_INSECUREAPI_UNCHECKEDRETURN = YES
CLANG_ANALYZER_SECURITY_INSECUREAPI_GETPW_GETS = YES
CLANG_ANALYZER_SECURITY_INSECUREAPI_MKSTEMP = YES
CLANG_ANALYZER_SECURITY_INSECUREAPI_RAND = YES
CLANG_ANALYZER_SECURITY_INSECUREAPI_STRCPY = YES
CLANG_ANALYZER_SECURITY_INSECUREAPI_VFORK = YES
// Swift Compiler - Code Generation
SWIFT_ENFORCE_EXCLUSIVE_ACCESS = on