diff --git a/package/yast2-devtools.changes b/package/yast2-devtools.changes index 9e2a274..981acd3 100644 --- a/package/yast2-devtools.changes +++ b/package/yast2-devtools.changes @@ -1,8 +1,15 @@ ------------------------------------------------------------------- -Fri Sep 01 19:57:03 UTC 2023 - Josef Reidinger +Fri Mar 10 17:23:47 UTC 2023 - Ladislav Slezák -- Branch package for SP6 (bsc#1208913) -- 4.6.2 +- Rubocop configuration update: Disable autocorrection for the + Lint/ScriptPermission cop or disable it completely. + (related to bsc#1209094) +- 4.6.1 + +------------------------------------------------------------------- +Fri Mar 03 14:44:07 UTC 2023 - Ladislav Slezák + +- Bump version to 4.6.0 (bsc#1208913) ------------------------------------------------------------------- Fri Sep 9 08:21:11 UTC 2022 - Michal Filka diff --git a/package/yast2-devtools.spec b/package/yast2-devtools.spec index 7a0010d..c6cc25b 100644 --- a/package/yast2-devtools.spec +++ b/package/yast2-devtools.spec @@ -17,7 +17,7 @@ Name: yast2-devtools -Version: 4.6.2 +Version: 4.6.1 Release: 0 Summary: YaST2 - Development Tools License: GPL-2.0-or-later diff --git a/ytools/y2tool/rubocop-0.71.0_yast_style.yml b/ytools/y2tool/rubocop-0.71.0_yast_style.yml index 79ff60e..3b05001 100644 --- a/ytools/y2tool/rubocop-0.71.0_yast_style.yml +++ b/ytools/y2tool/rubocop-0.71.0_yast_style.yml @@ -195,3 +195,16 @@ Style/TernaryParentheses: # And template version is needed if there are more params and it needs some formatting. Style/FormatStringToken: Enabled: false + +# Disable autocorrection for the Lint/ScriptPermission check. +# +# When Rubocop finds a shebang ("#!/usr/bin/env ruby") at the beginning of +# a file it checks for the executable file flag. That makes sense. +# However, the autocorrection action is to always add the exec flag to the file, +# but in some situations the correct fix is to actually remove the shebang as it +# does not make sense. For example the file just defines a class and there is +# nothing to execute). +# +# So require the developer to decide what is the correct fix. +Lint/ScriptPermission: + AutoCorrect: false diff --git a/ytools/y2tool/rubocop-1.24.1_yast_style.yml b/ytools/y2tool/rubocop-1.24.1_yast_style.yml index b564945..0424170 100644 --- a/ytools/y2tool/rubocop-1.24.1_yast_style.yml +++ b/ytools/y2tool/rubocop-1.24.1_yast_style.yml @@ -234,3 +234,22 @@ Metrics/BlockLength: # rspec is known as DSL with big blocks Exclude: - "**/test/**/*" + +# Disable the Lint/ScriptPermission check. +# +# When Rubocop finds a shebang ("#!/usr/bin/env ruby") at the beginning of +# a file it checks for the executable file flag. That makes sense. +# However, the autocorrection action is to always add the exec flag to the file, +# but in some situations the correct fix is to actually remove the shebang as it +# does not make sense (e.g. the file just defines a class and there is nothing +# to execute). +# +# NOTE: Ideally the check should be enabled with autocorrection disabled. But +# there is a bug in Rubocop 1.24.1 and disabled autocorrection is ignored, +# it always adds the exec flag. :-( +# +# So disable the cop completely and check how it behaves in the future Rubocop +# versions. +# +Lint/ScriptPermission: + Enabled: false