From 16284c95832a5dda558296a26539acea39d55876 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Fri, 10 May 2024 18:54:18 +0200 Subject: [PATCH] Rubocop: Enable Naming/VariableNumber I would like to clean up our .rubocop.yaml to follow our standards. I think enabling this cop makes sense, except for the `determine_if_x86_64` method. rubocop prefers `determine_if_x8664` but since `x86_64` is it's own name I disable the cop for this function. --- .rubocop.yml | 6 +++--- .../fixtures/module/spec/acceptance/demo_spec.rb | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 77d780b63..6a9bd71f6 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -22,9 +22,6 @@ Naming/MethodParameterName: Naming/PredicateName: Enabled: false -Naming/VariableNumber: - Enabled: false - RSpec/DescribeClass: Exclude: - acceptance/fixtures/module/spec/**/*.rb @@ -49,3 +46,6 @@ RSpec/NestedGroups: Style: Enabled: false + +Naming/VariableNumber: + AllowedPatterns: ['x86_64'] diff --git a/acceptance/fixtures/module/spec/acceptance/demo_spec.rb b/acceptance/fixtures/module/spec/acceptance/demo_spec.rb index d66072b69..7f1d19f0c 100644 --- a/acceptance/fixtures/module/spec/acceptance/demo_spec.rb +++ b/acceptance/fixtures/module/spec/acceptance/demo_spec.rb @@ -22,15 +22,15 @@ end it "is able to apply manifests" do - manifest_1 = "user {'foo': + manifest1 = "user {'foo': ensure => present,}" - manifest_2 = "user {'foo': + manifest2 = "user {'foo': ensure => absent,}" - manifest_3 = "user {'root': + manifest3 = "user {'root': ensure => present,}" - apply_manifest(manifest_1, :expect_changes => true) - apply_manifest(manifest_2, :expect_changes => true) - apply_manifest(manifest_3) + apply_manifest(manifest1, :expect_changes => true) + apply_manifest(manifest2, :expect_changes => true) + apply_manifest(manifest3) end describe service('sshd') do