Skip to content

Files

Latest commit

 

History

History
29 lines (20 loc) · 650 Bytes

Style-DoubleCopDisableDirective.md

File metadata and controls

29 lines (20 loc) · 650 Bytes

Pattern: Double disable comments on one line

Issue: -

Description

Detects double disable comments on one line. This is mostly to catch automatically generated comments that need to be regenerated.

Examples

# bad
def f # rubocop:disable Style/For # rubocop:disable Metrics/AbcSize
end

# good
# rubocop:disable Metrics/AbcSize
def f # rubocop:disable Style/For
end
# rubocop:enable Metrics/AbcSize

# if both fit on one line
def f # rubocop:disable Style/For, Metrics/AbcSize
end

Further Reading