From 6718f5b3760ed1d49a14f8aedae7a206e06ac33b Mon Sep 17 00:00:00 2001 From: Gavin Didrichsen Date: Tue, 12 Sep 2023 18:05:30 +0100 Subject: [PATCH] Ignore the rubocop Naming/MethodName violation. Signed-off-by: Gavin Didrichsen --- lib/puppet-strings/yard/handlers/ruby/data_type_handler.rb | 3 +++ lib/puppet-strings/yard/parsers/puppet/parser.rb | 3 +++ 2 files changed, 6 insertions(+) diff --git a/lib/puppet-strings/yard/handlers/ruby/data_type_handler.rb b/lib/puppet-strings/yard/handlers/ruby/data_type_handler.rb index 7268d466..20c85692 100644 --- a/lib/puppet-strings/yard/handlers/ruby/data_type_handler.rb +++ b/lib/puppet-strings/yard/handlers/ruby/data_type_handler.rb @@ -143,6 +143,8 @@ def literal(ast) @literal_visitor.visit_this_0(self, ast) end + # TODO: Fix the rubocop violations in this file between the following rubocop:disable/enable lines + # rubocop:disable Naming/MethodName # ----- The following methods are different/additions from the original Literal_evaluator def literal_Object(o) # Ignore any other object types @@ -214,6 +216,7 @@ def literal_LiteralHash(o) result[literal(entry.key)] = literal(entry.value) end end + # rubocop:enable Naming/MethodName end # Extracts the datatype attributes from a Puppet Data Type interface hash. diff --git a/lib/puppet-strings/yard/parsers/puppet/parser.rb b/lib/puppet-strings/yard/parsers/puppet/parser.rb index 98f4e302..7d227bfd 100644 --- a/lib/puppet-strings/yard/parsers/puppet/parser.rb +++ b/lib/puppet-strings/yard/parsers/puppet/parser.rb @@ -40,6 +40,8 @@ def enumerator private + # TODO: Fix the rubocop violations in this file between the following rubocop:disable/enable lines + # rubocop:disable Naming/MethodName def transform_Program(o) # Cache the lines of the source text; we'll use this to locate comments @lines = o.source_text.lines.to_a @@ -83,4 +85,5 @@ def transform_TypeAlias(o) def transform_Object(o) # Ignore anything else (will be compacted out of the resulting array) end + # rubocop:enable Naming/MethodName end