How to make rubocop ignore comments using regex

less than 1 minute read

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

Tags:

Categories:

Updated:

Leave a Comment