Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
tekezo committed Apr 3, 2016
1 parent a0b4dd5 commit 0a58d26
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions util/lint/xcodeproj.rb
Expand Up @@ -6,20 +6,23 @@

def check_value(name, value, configuration = nil)
return if ARGV.include?(name)

root = configuration.nil?

if configuration.nil? then
print " check #{name}\n"
configuration = $configuration
end

isexist = false
exists = false
configuration.each do |k,v|
if v.kind_of?(Enumerable) then
if check_value(name, value, v) then
isexist = true
exists = true
end
else
if name == k then
isexist = true
exists = true
if value.nil? then
print "[ERROR] Appear name: #{name}\n"
exit 1
Expand All @@ -31,12 +34,12 @@ def check_value(name, value, configuration = nil)
end
end

if configuration.nil? and (not isexist) then
if root and (not value.nil?) and (not exists) then
print "[ERROR] No setting: #{name}\n"
exit 1
end

isexist
exists
end

check_value('objectVersion', '46')
Expand Down

0 comments on commit 0a58d26

Please sign in to comment.