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
0a5cd240
Commit
0a5cd240
authored
Aug 22, 2012
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Linter] Detect warning disabling compiler flags.
parent
dc04fc22
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
linter.rb
lib/cocoapods/command/linter.rb
+9
-8
No files found.
lib/cocoapods/command/linter.rb
View file @
0a5cd240
...
@@ -218,14 +218,15 @@ module Pod
...
@@ -218,14 +218,15 @@ module Pod
source
=
spec
.
source
||
{}
source
=
spec
.
source
||
{}
text
=
@file
.
read
text
=
@file
.
read
messages
=
[]
messages
=
[]
messages
<<
"Missing license type"
unless
license
[
:type
]
messages
<<
"Missing license type"
unless
license
[
:type
]
messages
<<
"Sample license type"
if
license
[
:type
]
&&
license
[
:type
]
=~
/\(example\)/
messages
<<
"Sample license type"
if
license
[
:type
]
&&
license
[
:type
]
=~
/\(example\)/
messages
<<
"Invalid license type"
if
license
[
:type
]
&&
license
[
:type
]
=~
/\n/
messages
<<
"Invalid license type"
if
license
[
:type
]
&&
license
[
:type
]
=~
/\n/
messages
<<
"The summary is not meaningful"
if
spec
.
summary
=~
/A short description of/
messages
<<
"The summary is not meaningful"
if
spec
.
summary
=~
/A short description of/
messages
<<
"The description is not meaningful"
if
spec
.
description
&&
spec
.
description
=~
/An optional longer description of/
messages
<<
"The description is not meaningful"
if
spec
.
description
&&
spec
.
description
=~
/An optional longer description of/
messages
<<
"The summary should end with a dot"
if
spec
.
summary
!~
/.*\./
messages
<<
"The summary should end with a dot"
if
spec
.
summary
!~
/.*\./
messages
<<
"The description should end with a dot"
if
spec
.
description
!~
/.*\./
&&
spec
.
description
!=
spec
.
summary
messages
<<
"The description should end with a dot"
if
spec
.
description
!~
/.*\./
&&
spec
.
description
!=
spec
.
summary
messages
<<
"Comments must be deleted"
if
text
.
scan
(
/^\s*#/
).
length
>
24
messages
<<
"Comments must be deleted"
if
text
.
scan
(
/^\s*#/
).
length
>
24
messages
<<
"Warnings must not be disabled (`-Wno' compiler flags)"
if
spec
.
compiler_flags
.
split
(
' '
).
any?
{
|
flag
|
flag
.
start_with?
(
'-Wno'
)
}
if
(
git_source
=
source
[
:git
])
if
(
git_source
=
source
[
:git
])
messages
<<
"Git sources should specify either a tag or a commit"
unless
source
[
:commit
]
||
source
[
:tag
]
messages
<<
"Git sources should specify either a tag or a commit"
unless
source
[
:commit
]
||
source
[
:tag
]
...
...
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