Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
cocoapods
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gengmeiios
cocoapods
Commits
0cc8c2de
Commit
0cc8c2de
authored
May 09, 2015
by
Marius Rackwitz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Podfile] Internalize checks whether warnings should be inhibited
parent
1db8d02a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
1 deletion
+24
-1
pod_target_installer.rb
...oapods/installer/target_installer/pod_target_installer.rb
+1
-1
pod_target.rb
lib/cocoapods/target/pod_target.rb
+23
-0
No files found.
lib/cocoapods/installer/target_installer/pod_target_installer.rb
View file @
0cc8c2de
...
...
@@ -234,7 +234,7 @@ module Pod
flags
<<
'-DOS_OBJECT_USE_OBJC=0'
end
end
if
target
_definition
.
inhibits_warnings_for_pod?
(
consumer
.
spec
.
root
.
name
)
if
target
.
inhibit_warnings?
flags
<<
'-w -Xanalyzer -analyzer-disable-all-checks'
end
flags
*
' '
...
...
lib/cocoapods/target/pod_target.rb
View file @
0cc8c2de
...
...
@@ -152,6 +152,29 @@ module Pod
end
end
# Checks if warnings should be inhibited for this pod.
#
# @return [Bool]
#
def
inhibit_warnings?
whitelists
=
target_definitions
.
map
do
|
target_definition
|
target_definition
.
inhibits_warnings_for_pod?
(
root_spec
.
name
)
end
.
uniq
if
whitelists
.
empty?
return
false
elsif
whitelists
.
count
==
1
whitelists
.
first
else
UI
.
warn
"The pod `
#{
pod_name
}
` is linked to different targets "
\
"(
#{
target_definitions
.
map
(
&
:label
)
}
), which contain different "
\
'settings to inhibit warnings. CocoaPods does not currently '
\
'support different settings and will fall back to your preference '
\
'set in the root target definition.'
return
podfile
.
root_target_definitions
.
first
.
inhibits_warnings_for_pod?
(
root_spec
.
name
)
end
end
private
# @param [TargetDefinition] target_definition
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment