From 3429d42114df30550f588a94f6e5577f6f3b710c Mon Sep 17 00:00:00 2001 From: Henriette Darge Date: Thu, 5 Sep 2024 12:32:47 +0200 Subject: [PATCH] Remove OpenStruct from primer_octicon cop --- .changeset/eleven-tools-raise.md | 5 +++++ lib/rubocop/cop/primer/primer_octicon.rb | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/eleven-tools-raise.md diff --git a/.changeset/eleven-tools-raise.md b/.changeset/eleven-tools-raise.md new file mode 100644 index 0000000000..cd8ed50472 --- /dev/null +++ b/.changeset/eleven-tools-raise.md @@ -0,0 +1,5 @@ +--- +'@openproject/primer-view-components': patch +--- + +Remove OpenStruct from primer_octicon cop diff --git a/lib/rubocop/cop/primer/primer_octicon.rb b/lib/rubocop/cop/primer/primer_octicon.rb index ef3da2d1b9..9afb71e0b5 100644 --- a/lib/rubocop/cop/primer/primer_octicon.rb +++ b/lib/rubocop/cop/primer/primer_octicon.rb @@ -200,7 +200,7 @@ def string_args_to_string(node) def kwargs(node) return node.arguments.last if node.arguments.size > 1 - OpenStruct.new(keys: [], pairs: [], type: :hash) + RuboCop::AST::HashNode.new("hash") end def icon(node)