Class: Danger::DangerRegexp
- Inherits:
-
Plugin
- Object
- Plugin
- Danger::DangerRegexp
- Defined in:
- lib/danger_plugin.rb
Instance Method Summary collapse
Instance Method Details
#lint(&block) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/danger_plugin.rb', line 5 def lint(&block) @map = {} instance_eval(&block) git.diff.each do |diff| GitDiffParser::Patch.new(diff.patch).changed_lines.each do |line| @map.each do |regexp, | if line.content.match?(regexp) markdown(, file: diff.path, line: line.number) end end end end end |