Class: Danger::DangerWCC::RubocopExceptions
- Inherits:
-
Object
- Object
- Danger::DangerWCC::RubocopExceptions
- Includes:
- Utils
- Defined in:
- lib/wcc/rubocop_exceptions.rb
Constant Summary collapse
- DISABLE_REGEX =
/^(?:\+\s)?.*\#\s*rubocop\:disable\s+(\S+)/i
- ENABLE_REGEX =
/^(?:\+\s)?\s*\#\s*rubocop\:enable\s+(\S+)/i
- COMMENT_LINE_REGEX =
/^(?:\+\s)?\s*\#\s*(.+)$/i
Instance Method Summary collapse
-
#initialize(plugin, options = {}) ⇒ RubocopExceptions
constructor
A new instance of RubocopExceptions.
- #perform ⇒ Object
Methods included from Utils
#diff_strings, #each_addition_in_diff, #each_file_in_diff, #find_in_diff, #format_links_as_markdown, #issue, #logger, #parsed_diffs, #plugin, #run, #run_and_diff, #with_revision
Constructor Details
#initialize(plugin, options = {}) ⇒ RubocopExceptions
Returns a new instance of RubocopExceptions.
13 14 15 16 |
# File 'lib/wcc/rubocop_exceptions.rb', line 13 def initialize(plugin, = {}) @plugin = plugin @options = end |
Instance Method Details
#perform ⇒ Object
18 19 20 21 22 23 24 25 |
# File 'lib/wcc/rubocop_exceptions.rb', line 18 def perform find_new_exceptions.each do |e| = (e) severity = (e) issue(, severity: severity, file: e[:file], line: e[:disabled_at]) end end |