Skip to content

Commit

Permalink
[Specification::Linter] Give it a break with the punctuation thing!
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiopelosin committed Aug 1, 2013
1 parent b102140 commit b2c3f33
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
2 changes: 0 additions & 2 deletions lib/cocoapods-core/specification/linter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -208,14 +208,12 @@ def _validate_version(v)
def _validate_summary(s)
warning "The summary should be a short version of `description` (max 140 characters)." if s.length > 140
warning "The summary is not meaningful." if s =~ /A short description of/
warning "The summary should end with proper punctuation." if s !~ /(\.|\?|!)$/
end

# Performs validations related to the `description` attribute.
#
def _validate_description(d)
warning "The description is not meaningful." if d =~ /An optional longer description of/
warning "The description should end with proper punctuation." if d !~ /(\.|\?|!)$/
warning "The description is equal to the summary." if d == spec.summary
warning "The description is shorter than the summary." if d.length < spec.summary.length
end
Expand Down
10 changes: 0 additions & 10 deletions spec/specification/linter_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,6 @@ def message_should_include(*values)
message_should_include('summary', 'meaningful')
end

it "checks the summary punctuation" do
@spec.stubs(:summary).returns('sample')
message_should_include('summary', 'punctuation')
end

it "checks that there are not too many comments in the file" do
podspec = "# some comment\n" * 30
path = SpecHelper.temporary_directory + 'BananaLib.podspec'
Expand Down Expand Up @@ -199,11 +194,6 @@ def message_should_include(*values)
message_should_include('description', 'meaningful')
end

it "checks the description punctuation" do
@spec.stubs(:description).returns('sample ' * 100)
message_should_include('description', 'punctuation')
end

it "checks if the description is equal to the summary" do
@spec.stubs(:description).returns(@linter.spec.summary)
message_should_include('description', 'equal', 'summary')
Expand Down

1 comment on commit b2c3f33

@alloy
Copy link
Member

@alloy alloy commented on b2c3f33 Aug 1, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol

Please sign in to comment.