messages<<"The summary is required"ifspec.summary.empty?
messages<<"The summary is not meaningful"ifspec.summary=~/A short description of/
messages<<"The summary is not meaningful"ifspec.summary=~/A short description of/
messages<<"The description is not meaningful"ifspec.description&&spec.description=~/An optional longer description of/
messages<<"The description is not meaningful"ifspec.description&&spec.description=~/An optional longer description of/
messages<<"The summary should end with a dot"ifspec.summary!~/.*\./
messages<<"The summary should end with a dot"ifspec.summary!~/.*\./
messages<<"The description should end with a dot"ifspec.description!~/.*\./&&spec.description!=spec.summary
messages<<"The description should end with a dot"ifspec.description!~/.*\./&&spec.description!=spec.summary
messages<<"The summary should end with a dot"ifspec.summary!~/.*\./
messages<<"The summary should be short use `description` (max 140 characters)."ifspec.summary.length>140
messages<<"Comments must be deleted"iftext.scan(/^\s*#/).length>24
messages<<"Comments must be deleted"iftext.scan(/^\s*#/).length>24
messages<<"Warnings must not be disabled (`-Wno' compiler flags)"ifspec.compiler_flags.split(' ').any?{|flag|flag.start_with?('-Wno')}
messages<<"Warnings must not be disabled (`-Wno' compiler flags)"ifspec.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"unlesssource[:commit]||source[:tag]
messages<<"Git sources should specify either a tag or a commit"unlesssource[:commit]||source[:tag]
ifspec.version.to_s!='0.0.1'
messages<<"The version of the spec should be part of the git tag (not always applicable)"ifsource[:tag]&&!source[:tag].include?(spec.version.to_s)
messages<<"Git sources without tag should be marked as 0.0.1 (not always applicable)"if!source[:tag]
end
ifgit_source.include?('github.com')
ifgit_source.include?('github.com')
messages<<"Github repositories should end in `.git'"unlessgit_source.end_with?('.git')
messages<<"Github repositories should end in `.git'"unlessgit_source.end_with?('.git')
messages<<"Github repositories should use `https' link"unlessgit_source.start_with?('https://github.com')||git_source.start_with?('git://gist.github.com')
messages<<"Github repositories should use `https' link"unlessgit_source.start_with?('https://github.com')||git_source.start_with?('git://gist.github.com')