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
7d5581ad
Commit
7d5581ad
authored
May 24, 2012
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Linter] No-clean option.
parent
809745bd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 deletions
+11
-8
spec.rb
lib/cocoapods/command/spec.rb
+11
-8
No files found.
lib/cocoapods/command/spec.rb
View file @
7d5581ad
...
...
@@ -19,8 +19,9 @@ module Pod
end
def
self
.
options
[
[
"--quick"
,
"Lint skips checks that would require to donwload and build the spec"
],
[
"--only-errors"
,
"Lint validates even if warnings are present"
]
].
concat
(
super
)
[
[
"--quick"
,
"Lint skips checks that would require to donwload and build the spec"
],
[
"--only-errors"
,
"Lint validates even if warnings are present"
],
[
"--no-clean"
,
"Lint leaves the build directory intact for inspection"
]
].
concat
(
super
)
end
def
initialize
(
argv
)
...
...
@@ -32,6 +33,7 @@ module Pod
elsif
@action
==
'lint'
@quick
=
argv
.
option
(
'--quick'
)
@only_errors
=
argv
.
option
(
'--only-errors'
)
@no_clean
=
argv
.
option
(
'--no-clean'
)
@repo_or_podspec
=
argv
.
shift_argument
unless
argv
.
empty?
super
unless
argv
.
size
<=
1
else
...
...
@@ -80,10 +82,11 @@ module Pod
print
" ->
#{
spec
}
\r
"
unless
config
.
silent?
||
is_repo?
$stdout
.
flush
linter
=
Linter
.
new
(
spec
)
linter
.
lenient
=
@only_errors
linter
.
quick
=
@quick
||
is_repo?
invalid_count
+=
1
unless
linter
.
lint
linter
=
Linter
.
new
(
spec
)
linter
.
lenient
=
@only_errors
linter
.
quick
=
@quick
||
is_repo?
linter
.
no_clean
=
@no_clean
invalid_count
+=
1
unless
linter
.
lint
# This overwrites the previously printed text
puts
" -> "
.
send
(
lint_result_color
(
linter
))
<<
spec
.
to_s
unless
config
.
silent?
||
should_skip?
(
linter
)
...
...
@@ -152,7 +155,7 @@ module Pod
# TODO: Add check to ensure that attributes inherited by subspecs are not duplicated ?
attr_accessor
:quick
,
:lenient
attr_accessor
:quick
,
:lenient
,
:no_clean
attr_reader
:spec
,
:file
attr_reader
:errors
,
:warnings
,
:notes
...
...
@@ -250,7 +253,7 @@ module Pod
end
def
tear_down_lint_environment
tmp_dir
.
rmtree
tmp_dir
.
rmtree
unless
no_clean
Config
.
instance
=
@original_config
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