Skip to content

Instantly share code, notes, and snippets.

@jdno
Last active March 22, 2018 11:18
Show Gist options
  • Save jdno/ba9c04ad7f297a1e2745988d6810b6fc to your computer and use it in GitHub Desktop.
Save jdno/ba9c04ad7f297a1e2745988d6810b6fc to your computer and use it in GitHub Desktop.
Rubocop reports only the first of multiple Style/CommentAnnotation offenses if they are not separated by another line.
# frozen_string_literal: true
source 'https://rubygems.org'
ruby '2.5.0'
gem 'rubocop'
GEM
remote: https://rubygems.org/
specs:
ast (2.4.0)
parallel (1.12.1)
parser (2.5.0.4)
ast (~> 2.4.0)
powerpack (0.1.1)
rainbow (3.0.0)
rubocop (0.54.0)
parallel (~> 1.10)
parser (>= 2.5)
powerpack (~> 0.1)
rainbow (>= 2.2.2, < 4.0)
ruby-progressbar (~> 1.7)
unicode-display_width (~> 1.0, >= 1.0.1)
ruby-progressbar (1.9.0)
unicode-display_width (1.3.0)
PLATFORMS
ruby
DEPENDENCIES
rubocop
RUBY VERSION
ruby 2.5.0p0
BUNDLED WITH
1.16.1
jandavid@STS ~/D/j/rubocop-todo-bug> rubocop
Inspecting 2 files
C.
Offenses:
todo.rb:5:11: C: Style/CommentAnnotation: Annotation keywords like TODO should be all upper case, followed by a colon, and a space, then a note describing the problem.
'', # TODO Item 1
^^^^^
todo.rb:8:11: C: Style/CommentAnnotation: Annotation keywords like TODO should be all upper case, followed by a colon, and a space, then a note describing the problem.
'', # TODO Item 3
^^^^^
2 files inspected, 2 offenses detected
# frozen_string_literal: true
class ToBeDone
ITEMS = [
'', # TODO Item 1
'', # TODO Item 2
'', # TODO Item 3
].freeze
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment