Skip to content

Commit

Permalink
Set keywords for RuboCop cop Style/CommentAnnotation
Browse files Browse the repository at this point in the history
The offense from the TODOs  was a false positive. The comment which
triggered this was `# review accepted`.
  • Loading branch information
Dany Marcoux committed Jun 9, 2020
1 parent 9d45974 commit 4dcf20c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
6 changes: 6 additions & 0 deletions src/api/.rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ Lint/StructNewOverride:

#################### Style ###########################

Style/CommentAnnotation:
# Default keywords were TODO, FIXME, OPTIMIZE, HACK, REVIEW.
# We never use the last three and they can sometime trigger false positives,
# especially when a comment starts with "review" since we have those in OBS
Keywords: ['TODO', 'FIXME']

# We need to allow some variables related to rabbiMQ.
Style/GlobalVars:
AllowedVariables: ['$rabbitmq_conn', '$rabbitmq_exchange', '$rabbitmq_channel']
Expand Down
8 changes: 0 additions & 8 deletions src/api/.rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -555,14 +555,6 @@ Style/ClassVars:
- 'test/functional/branch_publish_flag_test.rb'
- 'test/test_helper.rb'

# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: Keywords.
# Keywords: TODO, FIXME, OPTIMIZE, HACK, REVIEW
Style/CommentAnnotation:
Exclude:
- 'test/functional/request_controller_test.rb'

# Offense count: 5
Style/CommentedKeyword:
Exclude:
Expand Down

0 comments on commit 4dcf20c

Please sign in to comment.