Skip to content

Commit 3e16bd2

Browse files
authored
Added more Danger checks
1 parent 9a821f0 commit 3e16bd2

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Dangerfile

+11
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,17 @@ warn 'Too many changes (when adding, please keep it to one project per Pull Requ
1010
# Warn if pull request is not updated
1111
warn 'Please update the Pull Request title to contain the library name' if github.pr_title.include? 'Update README.md'
1212

13+
incorrect_lines = []
14+
15+
File.open('README.md').each_line do |line|
16+
next if line !~ /- (?:(!\[v\d\]\(img\/vapor\-\d.png\) ))*\[.+\]\(https?.+\).+/
17+
next if line =~ /\) –/ && line =~ /\.$/
18+
19+
incorrect_lines.push(line)
20+
end
21+
22+
fail 'Please make sure your submission uses correctly sized dash and ends with a full stop' if incorrect_lines.count > 0
23+
1324
# Check links
1425
require 'json'
1526

0 commit comments

Comments
 (0)