|
| 1 | +################################################################################ |
| 2 | +# |
| 3 | +# This part contains the shared Rubocop configuration for SUSE projects. It is |
| 4 | +# maintained at https://github.com/SUSE/style-guides/blob/master/rubocop-suse.yml |
| 5 | +# |
| 6 | +# NOTE: some rules have been commented out, see the YaST specific changes |
| 7 | +# at the end of the file! |
| 8 | +# |
| 9 | +################################################################################ |
| 10 | + |
| 11 | +# Disabled, would require too many changes in the current code |
| 12 | +#Lint/EndAlignment: |
| 13 | +# StyleGuide: https://github.com/SUSE/style-guides/blob/master/Ruby.md#lintendalignment |
| 14 | +# AlignWith: variable |
| 15 | + |
| 16 | +Metrics/LineLength: |
| 17 | + StyleGuide: https://github.com/SUSE/style-guides/blob/master/Ruby.md#metricslinelength |
| 18 | + Max: 110 |
| 19 | + # To make it possible to copy or click on URIs in the code, we allow lines |
| 20 | + # contaning a URI to be longer than Max. |
| 21 | + AllowURI: true |
| 22 | + URISchemes: |
| 23 | + - http |
| 24 | + - https |
| 25 | + |
| 26 | +Style/AlignHash: |
| 27 | + StyleGuide: https://github.com/SUSE/style-guides/blob/master/Ruby.md#stylealignhash |
| 28 | + EnforcedHashRocketStyle: table |
| 29 | + EnforcedColonStyle: table |
| 30 | + |
| 31 | +# Disabled, see the YaST default at the end of the file |
| 32 | +#Style/AlignParameters: |
| 33 | +# StyleGuide: https://github.com/SUSE/style-guides/blob/master/Ruby.md#stylealignparameters |
| 34 | +# Enabled: false |
| 35 | + |
| 36 | +Style/CollectionMethods: |
| 37 | + StyleGuide: https://github.com/SUSE/style-guides/blob/master/Ruby.md#stylecollectionmethods |
| 38 | + Enabled: false |
| 39 | + |
| 40 | +Style/EmptyLinesAroundBlockBody: |
| 41 | + StyleGuide: https://github.com/SUSE/style-guides/blob/master/Ruby.md#styleemptylinesaroundblockbody |
| 42 | + Enabled: false |
| 43 | + |
| 44 | +Style/MultilineOperationIndentation: |
| 45 | + StyleGuide: https://github.com/SUSE/style-guides/blob/master/Ruby.md#stylemultilineoperationindentation |
| 46 | + EnforcedStyle: indented |
| 47 | + |
| 48 | +Style/StringLiterals: |
| 49 | + StyleGuide: https://github.com/SUSE/style-guides/blob/master/Ruby.md#stylestringliterals |
| 50 | + EnforcedStyle: double_quotes |
| 51 | + Enabled: false |
| 52 | + |
| 53 | +Style/StringLiteralsInInterpolation: |
| 54 | + StyleGuide: https://github.com/SUSE/style-guides/blob/master/Ruby.md#stylestringliteralsininterpolation |
| 55 | + EnforcedStyle: double_quotes |
| 56 | + |
| 57 | +Style/WordArray: |
| 58 | + StyleGuide: https://github.com/SUSE/style-guides/blob/master/Ruby.md#deviations-from-the-upstream-style-guide |
| 59 | + Enabled: false |
| 60 | + |
| 61 | +Style/RegexpLiteral: |
| 62 | + StyleGuide: https://github.com/SUSE/style-guides/blob/master/Ruby.md#deviations-from-the-upstream-style-guide |
| 63 | + Enabled: false |
| 64 | + |
| 65 | +Style/SignalException: |
| 66 | + StyleGuide: https://github.com/bbatsov/ruby-style-guide#fail-method |
| 67 | + EnforcedStyle: only_raise |
| 68 | + |
| 69 | + |
| 70 | +################################################################################ |
| 71 | +# |
| 72 | +# This part contains the YaST specific changes to the shared SUSE configuration |
| 73 | +# |
| 74 | +################################################################################ |
| 75 | + |
| 76 | +# no extra indentation for multiline function calls |
| 77 | +Style/AlignParameters: |
| 78 | + EnforcedStyle: with_fixed_indentation |
| 79 | + |
| 80 | +# no extra indentation for case |
| 81 | +Style/CaseIndentation: |
| 82 | + IndentWhenRelativeTo: end |
| 83 | + |
| 84 | +# "unless" has a different connotation than "if not" |
| 85 | +Style/NegatedIf: |
| 86 | + Enabled: false |
| 87 | + |
| 88 | + |
| 89 | +################################################################################ |
| 90 | +# |
| 91 | +# Settings specific to the yast-hana-update module |
| 92 | +# |
| 93 | +################################################################################ |
| 94 | + |
| 95 | +# Edited for yast-hana-update |
| 96 | +Metrics/MethodLength: |
| 97 | + Max: 60 |
| 98 | + |
| 99 | +# Edited for yast-hana-update |
| 100 | +Metrics/ClassLength: |
| 101 | + Max: 400 |
| 102 | + |
| 103 | +Metrics/CyclomaticComplexity: |
| 104 | + Enabled: false |
| 105 | + |
| 106 | +Metrics/PerceivedComplexity: |
| 107 | + Enabled: false |
| 108 | + |
| 109 | +Metrics/AbcSize: |
| 110 | + Enabled: false |
0 commit comments