Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
marknuzz opened this issue Dec 23, 2021 · 0 comments

Comments

@marknuzz
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant