# NOTE: This is a copy from https://github.com/yast/yast-devtools/blob/master/ytools/y2tool/rubocop_yast_style.yml ################################################################################ # # This part contains the shared Rubocop configuration for SUSE projects. It is # maintained at https://github.com/SUSE/style-guides/blob/master/rubocop-suse.yml # # NOTE: some rules have been commented out, see the YaST specific changes # at the end of the file! # ################################################################################ # Disabled, would require too many changes in the current code #Lint/EndAlignment: # StyleGuide: https://github.com/SUSE/style-guides/blob/master/Ruby.md#lintendalignment # AlignWith: variable Metrics/AbcSize: StyleGuide: https://github.com/SUSE/style-guides/blob/master/Ruby.md#metricsabcsize Max: 30 Metrics/LineLength: StyleGuide: https://github.com/SUSE/style-guides/blob/master/Ruby.md#metricslinelength Max: 100 # To make it possible to copy or click on URIs in the code, we allow lines # contaning a URI to be longer than Max. AllowURI: true URISchemes: - http - https Layout/AlignHash: StyleGuide: https://github.com/SUSE/style-guides/blob/master/Ruby.md#stylealignhash EnforcedHashRocketStyle: table EnforcedColonStyle: table # Disabled, see the YaST default at the end of the file #Style/AlignParameters: # StyleGuide: https://github.com/SUSE/style-guides/blob/master/Ruby.md#stylealignparameters # Enabled: false Style/CollectionMethods: StyleGuide: https://github.com/SUSE/style-guides/blob/master/Ruby.md#stylecollectionmethods Enabled: false Layout/EmptyLinesAroundBlockBody: StyleGuide: https://github.com/SUSE/style-guides/blob/master/Ruby.md#styleemptylinesaroundblockbody Enabled: false Layout/MultilineOperationIndentation: StyleGuide: https://github.com/SUSE/style-guides/blob/master/Ruby.md#stylemultilineoperationindentation EnforcedStyle: indented Style/StringLiterals: StyleGuide: https://github.com/SUSE/style-guides/blob/master/Ruby.md#stylestringliterals EnforcedStyle: double_quotes Style/StringLiteralsInInterpolation: StyleGuide: https://github.com/SUSE/style-guides/blob/master/Ruby.md#stylestringliteralsininterpolation EnforcedStyle: double_quotes Style/WordArray: StyleGuide: https://github.com/SUSE/style-guides/blob/master/Ruby.md#deviations-from-the-upstream-style-guide Enabled: false Style/RegexpLiteral: StyleGuide: https://github.com/SUSE/style-guides/blob/master/Ruby.md#deviations-from-the-upstream-style-guide Enabled: false Style/SignalException: StyleGuide: https://github.com/bbatsov/ruby-style-guide#fail-method EnforcedStyle: only_raise ################################################################################ # # This part contains the YaST specific changes to the shared SUSE configuration # ################################################################################ # no extra indentation for multiline function calls Layout/AlignParameters: EnforcedStyle: with_fixed_indentation # no extra indentation for case Layout/CaseIndentation: EnforcedStyle: end # "unless" has a different connotation than "if not" Style/NegatedIf: Enabled: false # allow more than 10 lines for methods Metrics/MethodLength: Max: 30 Metrics/ClassLength: Max: 250 Metrics/BlockLength: Exclude: - '**/*.gemspec' Layout/IndentHeredoc: Enabled: false AllCops: # do not check the locally installed gems Exclude: - '.vendor/**/*' - 'vendor/**/*' - 'package/*.spec'