From d2c7146bfe56da879d83ca11afd853d83a7f6bbe Mon Sep 17 00:00:00 2001 From: Steffen Planthaber Date: Wed, 13 Jul 2022 16:35:00 +0200 Subject: [PATCH 1/9] Improve load_config_once_with_permission documentation --- lib/autoproj/configuration.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/autoproj/configuration.rb b/lib/autoproj/configuration.rb index 1dbad190..c2e817d0 100644 --- a/lib/autoproj/configuration.rb +++ b/lib/autoproj/configuration.rb @@ -633,8 +633,7 @@ def load_config_once_with_permission(filename, default: "yes", config_dir: Autop declare "use_default_config_#{seed_config}", "boolean", default: default, - doc: ["Should the default workspace config be used?", - "This buildconf denines a default configuration in the buildconf (#{seed_config})", + doc: ["This buildconf defines a default workspace configuration (#{seed_config})", "Should it be applied?"] if get("use_default_config_#{seed_config}") load_config_once(filename, config_dir: config_dir) From b252d3671b17ffa45d6cc517b15e208f4fb7fcda Mon Sep 17 00:00:00 2001 From: Steffen Planthaber Date: Fri, 15 Jul 2022 14:04:48 +0200 Subject: [PATCH 2/9] Fix rubocop error Error: The `Gemspec/DateAssignment` cop has been removed. Please use `Gemspec/DeprecatedAttributeAssignment` instead. --- .rubocop.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.rubocop.yml b/.rubocop.yml index 3a1a9071..eee5a0cb 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -20,7 +20,7 @@ Metrics/ParameterLists: Naming/MethodParameterName: AllowedNames: [io, id, to, by, on, in, at, ip, db, ws] -Gemspec/DateAssignment: # new in 1.10 +Gemspec/DeprecatedAttributeAssignment: # new in 1.10 Enabled: true Layout/LineEndStringConcatenationIndentation: # new in 1.18 Enabled: true From a00f603fe801405aa1e00e5d47d5805300dc6903 Mon Sep 17 00:00:00 2001 From: Steffen Planthaber Date: Fri, 15 Jul 2022 14:09:26 +0200 Subject: [PATCH 3/9] Update .rubocop.yml --- .rubocop.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.rubocop.yml b/.rubocop.yml index eee5a0cb..59e3cf13 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -20,7 +20,7 @@ Metrics/ParameterLists: Naming/MethodParameterName: AllowedNames: [io, id, to, by, on, in, at, ip, db, ws] -Gemspec/DeprecatedAttributeAssignment: # new in 1.10 +Gemspec/DeprecatedDataAssignment: # new in 1.10 Enabled: true Layout/LineEndStringConcatenationIndentation: # new in 1.18 Enabled: true From 74edf3efd35b80f162b9bfca54c4ab26dc14a8dc Mon Sep 17 00:00:00 2001 From: Steffen Planthaber Date: Fri, 15 Jul 2022 14:12:02 +0200 Subject: [PATCH 4/9] Update .rubocop.yml --- .rubocop.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.rubocop.yml b/.rubocop.yml index 59e3cf13..eee5a0cb 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -20,7 +20,7 @@ Metrics/ParameterLists: Naming/MethodParameterName: AllowedNames: [io, id, to, by, on, in, at, ip, db, ws] -Gemspec/DeprecatedDataAssignment: # new in 1.10 +Gemspec/DeprecatedAttributeAssignment: # new in 1.10 Enabled: true Layout/LineEndStringConcatenationIndentation: # new in 1.18 Enabled: true From 9049b5478dfd0a6e01887aa325174f93b770c3b2 Mon Sep 17 00:00:00 2001 From: Steffen Planthaber Date: Fri, 15 Jul 2022 14:19:13 +0200 Subject: [PATCH 5/9] Update .rubocop.yml --- .rubocop.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.rubocop.yml b/.rubocop.yml index eee5a0cb..713f3f20 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -20,7 +20,7 @@ Metrics/ParameterLists: Naming/MethodParameterName: AllowedNames: [io, id, to, by, on, in, at, ip, db, ws] -Gemspec/DeprecatedAttributeAssignment: # new in 1.10 +Gemspec/DateTime: # new in 1.10 Enabled: true Layout/LineEndStringConcatenationIndentation: # new in 1.18 Enabled: true From 361d2d9d6fbbbab2152fbae3c44df2488a75bc72 Mon Sep 17 00:00:00 2001 From: Steffen Planthaber Date: Fri, 15 Jul 2022 14:22:54 +0200 Subject: [PATCH 6/9] Update .rubocop.yml --- .rubocop.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 713f3f20..7cd8cd3c 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -20,8 +20,6 @@ Metrics/ParameterLists: Naming/MethodParameterName: AllowedNames: [io, id, to, by, on, in, at, ip, db, ws] -Gemspec/DateTime: # new in 1.10 - Enabled: true Layout/LineEndStringConcatenationIndentation: # new in 1.18 Enabled: true Layout/SpaceBeforeBrackets: # new in 1.7 From 6fccb2d02fd8316243f3f5a1818dce687e8dacd9 Mon Sep 17 00:00:00 2001 From: Steffen Planthaber Date: Fri, 15 Jul 2022 14:28:36 +0200 Subject: [PATCH 7/9] Update os_package_installer.rb --- lib/autoproj/os_package_installer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/autoproj/os_package_installer.rb b/lib/autoproj/os_package_installer.rb index a89edf2d..139d29a9 100644 --- a/lib/autoproj/os_package_installer.rb +++ b/lib/autoproj/os_package_installer.rb @@ -185,7 +185,7 @@ def osdeps_mode_string_to_value(string) when "gem" then modes << "gem" when "pip" then modes << "pip" when "os" then modes << "os" - when "none" then # rubocop:disable Lint/EmptyWhen + when "none" then else if package_managers.key?(str) modes << str From 271f3ea1d635ba8074bcb32213969aceab797dd5 Mon Sep 17 00:00:00 2001 From: Steffen Planthaber Date: Fri, 15 Jul 2022 14:32:45 +0200 Subject: [PATCH 8/9] Update os_package_installer.rb --- lib/autoproj/os_package_installer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/autoproj/os_package_installer.rb b/lib/autoproj/os_package_installer.rb index 139d29a9..a89edf2d 100644 --- a/lib/autoproj/os_package_installer.rb +++ b/lib/autoproj/os_package_installer.rb @@ -185,7 +185,7 @@ def osdeps_mode_string_to_value(string) when "gem" then modes << "gem" when "pip" then modes << "pip" when "os" then modes << "os" - when "none" then + when "none" then # rubocop:disable Lint/EmptyWhen else if package_managers.key?(str) modes << str From 887b1e6fa937620d18021f1e9c8ac4920980a13c Mon Sep 17 00:00:00 2001 From: Steffen Planthaber Date: Fri, 15 Jul 2022 14:46:24 +0200 Subject: [PATCH 9/9] resolve rubocop:disable Lint/EmptyWhen by calling "nil" --- lib/autoproj/os_package_installer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/autoproj/os_package_installer.rb b/lib/autoproj/os_package_installer.rb index a89edf2d..6ea684dd 100644 --- a/lib/autoproj/os_package_installer.rb +++ b/lib/autoproj/os_package_installer.rb @@ -185,7 +185,7 @@ def osdeps_mode_string_to_value(string) when "gem" then modes << "gem" when "pip" then modes << "pip" when "os" then modes << "os" - when "none" then # rubocop:disable Lint/EmptyWhen + when "none" then nil else if package_managers.key?(str) modes << str