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
2b75d11c
Commit
2b75d11c
authored
Sep 26, 2015
by
Samuel Giddins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Validator] Validate that all headers are inside the header_mappings_dir
parent
ce442f4a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
1 deletion
+16
-1
validator.rb
lib/cocoapods/validator.rb
+16
-1
No files found.
lib/cocoapods/validator.rb
View file @
2b75d11c
...
...
@@ -454,6 +454,7 @@ module Pod
end
end
_validate_header_mappings_dir
if
consumer
.
spec
.
root?
_validate_license
_validate_module_map
...
...
@@ -491,12 +492,26 @@ module Pod
def
_validate_header_files
(
attr_name
)
non_header_files
=
file_accessor
.
send
(
attr_name
).
select
{
|
f
|
!
Sandbox
::
FileAccessor
::
HEADER_EXTENSIONS
.
include?
(
f
.
extname
)
}.
map
{
|
f
|
f
.
relative_path_from
file_accessor
.
root
}
map
{
|
f
|
f
.
relative_path_from
(
file_accessor
.
root
)
}
unless
non_header_files
.
empty?
error
(
attr_name
,
"The pattern matches non-header files (
#{
non_header_files
.
join
(
', '
)
}
)."
)
end
end
def
_validate_header_mappings_dir
return
unless
header_mappings_dir
=
file_accessor
.
spec_consumer
.
header_mappings_dir
absolute_mappings_dir
=
file_accessor
.
root
+
header_mappings_dir
unless
absolute_mappings_dir
.
directory?
error
(
'header_mappings_dir'
,
"The header_mappings_dir (`
#{
header_mappings_dir
}
`) is not a directory."
)
end
non_mapped_headers
=
file_accessor
.
headers
.
reject
{
|
h
|
h
.
to_path
.
start_with?
(
absolute_mappings_dir
.
to_path
)
}.
map
{
|
f
|
f
.
relative_path_from
(
file_accessor
.
root
)
}
unless
non_mapped_headers
.
empty?
error
(
'header_mappings_dir'
,
"There are header files outside of the header_mappings_dir (
#{
non_mapped_headers
.
join
(
', '
)
}
)."
)
end
end
#-------------------------------------------------------------------------#
private
...
...
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