code-quality

How to make rubocop ignore comments using regex

How to make rubocop ignore comments using regex

rubocop
How to make rubocop ignore comments using regex

It’s possible to define regex patterns to automatically ignore certain lines in rubocop.yml, so you could choose to ignore all lines starting with a # character:

Metrics/LineLength:
  Max: 80
  IgnoredPatterns: ['\A#']

Reference: https://stackoverflow.com/a/42833040/4096120

About the author

Prakash Poudel Sharma

Engineering Manager · Product Owner · Varicon

Engineering Manager at Varicon, leading the Onboarding squad as Product Owner. Eleven years of building software — first as a programmer, then as a founder, now sharpening the product craft from the inside of a focused team.

Keep reading

More on this

Comments