From 081c35c649dc2cc85a1cccd9b30e293fe8c3af09 Mon Sep 17 00:00:00 2001 From: Daniel O'Connor Date: Sat, 13 Jul 2024 08:56:13 +0000 Subject: [PATCH] Style/EvalWithLocation --- .rubocop_todo.yml | 10 ++-------- lib/commentable_methods.rb | 2 +- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 81d4f3b..315b795 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,6 +1,6 @@ # This configuration was generated by # `rubocop --auto-gen-config` -# on 2024-07-13 08:53:50 UTC using RuboCop version 1.65.0. +# on 2024-07-13 08:55:59 UTC using RuboCop version 1.65.0. # The point is for the user to remove these configuration records # one by one as the offenses are removed from the code base. # Note that changes in the inspected code, or installation of new @@ -16,7 +16,7 @@ Gemspec/RequiredRubyVersion: # Offense count: 5 # Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes. Metrics/AbcSize: - Max: 36 + Max: 37 # Offense count: 1 # Configuration parameters: CountComments, CountAsOne. @@ -75,12 +75,6 @@ Style/Documentation: - 'lib/generators/comment/templates/comment.rb' - 'lib/generators/comment/templates/create_comments.rb' -# Offense count: 1 -# This cop supports safe autocorrection (--autocorrect). -Style/EvalWithLocation: - Exclude: - - 'lib/commentable_methods.rb' - # Offense count: 15 # This cop supports unsafe autocorrection (--autocorrect-all). # Configuration parameters: EnforcedStyle. diff --git a/lib/commentable_methods.rb b/lib/commentable_methods.rb index b572c3d..2127bc3 100644 --- a/lib/commentable_methods.rb +++ b/lib/commentable_methods.rb @@ -77,7 +77,7 @@ def add_#{method_name.singularize}(comment) comment.role = "#{role}" #{method_name} << comment end - } + }, __FILE__, __LINE__ - 21 end end end