simplecov icon indicating copy to clipboard operation
simplecov copied to clipboard

Feature Request: Comment at the end of a line to disable coverage for a single line

Open marknuzz opened this issue 3 years ago • 0 comments

I'd like to be able to disable both branch and line coverage for a single line by appending a comment to the end of the line

Something like

    rescue Exception => e # rubocop:disable Lint/RescueException
      log_failure e
      raise unless @eat_exception
      raise if !e.is_a?(StandardError) # :nocovline:

Adding and removing coverage for single lines requires three lines now, which adds to the verbosity of the code file and reduces readability.

marknuzz avatar Dec 23 '21 21:12 marknuzz