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
e8396921
Commit
e8396921
authored
Apr 21, 2012
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Pod::Command::Spec#lint] warnings for commments in podspec file
parent
9c4baa84
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
push.rb
lib/cocoapods/command/push.rb
+1
-1
spec.rb
lib/cocoapods/command/spec.rb
+2
-0
No files found.
lib/cocoapods/command/push.rb
View file @
e8396921
...
@@ -61,7 +61,7 @@ module Pod
...
@@ -61,7 +61,7 @@ module Pod
end
end
def
validate_podspec_files!
def
validate_podspec_files!
puts
"
\n
Validating specs
\n
"
.
yellow
unless
config
.
silent
puts
"
\n
Validating specs"
.
yellow
unless
config
.
silent
lint_argv
=
[
"lint"
]
lint_argv
=
[
"lint"
]
lint_argv
<<
"--silent"
if
config
.
silent
lint_argv
<<
"--silent"
if
config
.
silent
all_valid
=
Spec
.
new
(
ARGV
.
new
(
lint_argv
)).
run
all_valid
=
Spec
.
new
(
ARGV
.
new
(
lint_argv
)).
run
...
...
lib/cocoapods/command/spec.rb
View file @
e8396921
...
@@ -118,6 +118,7 @@ module Pod
...
@@ -118,6 +118,7 @@ module Pod
def
warnings_for_spec
(
spec
,
file
,
is_repo
)
def
warnings_for_spec
(
spec
,
file
,
is_repo
)
license
=
spec
.
license
license
=
spec
.
license
source
=
spec
.
source
source
=
spec
.
source
text
=
file
.
read
warnings
=
[]
warnings
=
[]
warnings
<<
"The name of the spec should match the name of the file"
unless
path_matches_name?
(
file
,
spec
)
warnings
<<
"The name of the spec should match the name of the file"
unless
path_matches_name?
(
file
,
spec
)
warnings
<<
"Missing license[:type]"
unless
license
&&
license
[
:type
]
warnings
<<
"Missing license[:type]"
unless
license
&&
license
[
:type
]
...
@@ -125,6 +126,7 @@ module Pod
...
@@ -125,6 +126,7 @@ module Pod
warnings
<<
"The description should end with a dot"
if
spec
.
description
&&
spec
.
description
!~
/.*\./
warnings
<<
"The description should end with a dot"
if
spec
.
description
&&
spec
.
description
!~
/.*\./
warnings
<<
"The summary should end with a dot"
if
spec
.
summary
!~
/.*\./
warnings
<<
"The summary should end with a dot"
if
spec
.
summary
!~
/.*\./
warnings
<<
"Missing license[:file] or [:text]"
unless
is_repo
||
license
&&
(
license
[
:file
]
||
license
[
:text
])
warnings
<<
"Missing license[:file] or [:text]"
unless
is_repo
||
license
&&
(
license
[
:file
]
||
license
[
:text
])
warnings
<<
"Comments must be deleted"
if
text
=~
/^\w*#/
#TODO: the previous ´is_repo' check is there only because at the time of 0.6.0rc1 it would be triggered in all specs
#TODO: the previous ´is_repo' check is there only because at the time of 0.6.0rc1 it would be triggered in all specs
warnings
warnings
end
end
...
...
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