diff --git a/.rubocop.yml b/.rubocop.yml new file mode 100644 index 000000000..4da8599fc --- /dev/null +++ b/.rubocop.yml @@ -0,0 +1,34 @@ +# use the shared YaST defaults +inherit_from: + /usr/share/YaST2/data/devtools/data/rubocop_yast_style.yml + +# Don't enforce any particular name for block params +SingleLineBlockParams: + Enabled: false + +# The general YaST agreement is 100 characters, so it fits into standard +# resolutions and Github's pull request view. But let's open the threshold a +# little bit +Metrics/LineLength: + Max: 105 + +# Enforce if/unless at the end only for really short lines +Style/IfUnlessModifier: + MaxLineLength: 60 + +# some storage API have size method, but without empty? method +# for details see https://github.com/yast/yast-storage-ng/pull/83 +Style/ZeroLengthPredicate: + Enabled: false + +Style/FormatString: + Exclude: + - 'src/lib/users/encryption_proposal.rb' + - 'src/lib/users/proposal.rb' + +AllCops: + Exclude: + - 'src/modules/**/*' + - 'src/include/**/*' + - 'testsuite/**/*' + - 'src/clients/*'