From ee8a98634c052e91d0bf0b1982b3e87d7f12864b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ladislav=20Slez=C3=A1k?= Date: Thu, 14 Nov 2024 17:07:59 +0100 Subject: [PATCH] Rubocop fix --- service/.rubocop.yml | 3 +++ service/lib/agama/dbus/users.rb | 9 ++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/service/.rubocop.yml b/service/.rubocop.yml index ada6a9f15e..f5bea90ce8 100644 --- a/service/.rubocop.yml +++ b/service/.rubocop.yml @@ -28,3 +28,6 @@ Lint/UselessAssignment: # be less strict Metrics/AbcSize: Max: 32 + +Metrics/ParameterLists: + Max: 6 diff --git a/service/lib/agama/dbus/users.rb b/service/lib/agama/dbus/users.rb index 099ee5740e..e44e2b09a8 100644 --- a/service/lib/agama/dbus/users.rb +++ b/service/lib/agama/dbus/users.rb @@ -58,7 +58,8 @@ def issues USERS_INTERFACE = "org.opensuse.Agama.Users1" private_constant :USERS_INTERFACE - FUSER_SIG = "in FullName:s, in UserName:s, in Password:s, in EncryptedPassword:b, in AutoLogin:b, in data:a{sv}" + FUSER_SIG = "in FullName:s, in UserName:s, in Password:s, in EncryptedPassword:b, " \ + "in AutoLogin:b, in data:a{sv}" private_constant :FUSER_SIG dbus_interface USERS_INTERFACE do @@ -97,9 +98,11 @@ def issues dbus_method :SetFirstUser, # It returns an Struct with the first field with the result of the operation as a boolean # and the second parameter as an array of issues found in case of failure - FUSER_SIG + ", out result:(bas)" do |full_name, user_name, password, encrypted_password, auto_login, data| + FUSER_SIG + ", out result:(bas)" do + |full_name, user_name, password, encrypted_password, auto_login, data| logger.info "Setting first user #{full_name}" - user_issues = backend.assign_first_user(full_name, user_name, password, encrypted_password, auto_login, data) + user_issues = backend.assign_first_user(full_name, user_name, password, + encrypted_password, auto_login, data) if user_issues.empty? dbus_properties_changed(USERS_INTERFACE, { "FirstUser" => first_user }, [])