Skip to content

Commit

Permalink
Added more Danger checks
Browse files Browse the repository at this point in the history
  • Loading branch information
Cellane committed Feb 20, 2018
1 parent 9a821f0 commit 3e16bd2
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Dangerfile
Expand Up @@ -10,6 +10,17 @@ warn 'Too many changes (when adding, please keep it to one project per Pull Requ
# Warn if pull request is not updated
warn 'Please update the Pull Request title to contain the library name' if github.pr_title.include? 'Update README.md'

incorrect_lines = []

File.open('README.md').each_line do |line|
next if line !~ /- (?:(!\[v\d\]\(img\/vapor\-\d.png\) ))*\[.+\]\(https?.+\).+/
next if line =~ /\) –/ && line =~ /\.$/

incorrect_lines.push(line)
end

fail 'Please make sure your submission uses correctly sized dash and ends with a full stop' if incorrect_lines.count > 0

# Check links
require 'json'

Expand Down

0 comments on commit 3e16bd2

Please sign in to comment.