Install KeePassXC 2.5.4 from buster-backports (#17286)
[tails.git] / .rubocop.yml
blobacfe6a9425f7e72ee0c02c85ba8729e348930f1b
1 # This file (.rubocop.yml) encodes consciously chosen deviation from Rubocop's
2 # default configuration. The jury is still out regarding other checks, which are
3 # disabled or tweaked in .rubocop_todo.yml.
5 inherit_from: .rubocop_todo.yml
7 AllCops:
8   Exclude:
9     # Let's ignore this script until we start using it and maintaining
10     # the corresponding doc-source-relationships.yml
11     - 'bin/doc-impacted-by'
12   TargetRubyVersion: 2.5
14 Layout/HashAlignment:
15   EnforcedHashRocketStyle: table
16   EnforcedColonStyle: table
18 Lint/SuppressedException:
19   AllowComments: true
21 Metrics/AbcSize:
22   Max: 30
24 Metrics/BlockLength:
25   Max: 27
26   ExcludedMethods:
27     # Rake
28     - 'namespace'
29     - 'task'
30     # Vagrant
31     - 'Vagrant.configure'
33 Metrics/ClassLength:
34   Max: 200
36 Metrics/CyclomaticComplexity:
37   Max: 9
39 Metrics/MethodLength:
40   Max: 30
42 Metrics/ParameterLists:
43   CountKeywordArgs: false
45 Metrics/PerceivedComplexity:
46   Max: 10
48 Naming/BlockParameterName:
49   AllowedNames:
50     - expected_patterns_MiB
51     - size_MiB
52     - size_in_MiB_of_destination_disk
54 Naming/MethodName:
55   IgnoredPatterns:
56     # Cucumber
57     - \A(After|Before)Feature\z
58     # Case matters: bit vs. byte
59     - _(kB|MiB)\z
60     # Stay close to Dogtail's API
61     - \A(pressKey|roleName|typeText)\z
62     # Stay close to OpenCV's API
63     - \AmatchTemplate\z
65 Naming/MethodParameterName:
66   AllowedNames:
67     - h
68     - to
69     - vm
70     - w
71     - x
72     - y
74 Style/AccessModifierDeclarations:
75   EnforcedStyle: inline
77 Style/AsciiComments:
78   Enabled: false
80 Style/AutoResourceCleanup:
81   Enabled: true
83 Style/ClassAndModuleChildren:
84   EnforcedStyle: compact
86 Style/ClassVars:
87   Exclude:
88     - 'features/support/helpers/dogtail.rb'
89     - 'features/support/helpers/remote_shell.rb'
91 Style/CollectionMethods:
92   Enabled: true
94 Style/ConstantVisibility:
95   Enabled: true
97 Style/FrozenStringLiteralComment:
98   Enabled: false
100 Style/GlobalVars:
101   Exclude:
102     - 'Rakefile'
104 Style/GuardClause:
105   MinBodyLength: 3
107 Style/HashEachMethods:
108   Enabled: true
110 Style/HashTransformKeys:
111   Enabled: true
113 Style/HashTransformValues:
114   Enabled: true
116 Style/HashSyntax:
117   EnforcedStyle: ruby19_no_mixed_keys
119 Style/MethodCallWithArgsParentheses:
120   Enabled: true
121   IgnoredMethods:
122     - abort
123     - assert
124     - basename
125     - chdir
126     - debug_log
127     - define
128     - delete
129     - desc
130     - exist?
131     - exit
132     - fatal_system
133     - include
134     - include?
135     - mkdir
136     - mktmpdir
137     - puts
138     - raise
139     - remove_entry_secure
140     - require
141     - require_relative
142     - returncode
143     - separator
144     - should
145     - should_not
146     - sleep
147     - start_with?
148     - step
149     - task
150     - wait
151     - warn
152     - write
153     - yield
155 Style/MethodCalledOnDoEndBlock:
156   Enabled: true
158 Style/NumericLiterals:
159   MinDigits: 6
161 Style/OptionHash:
162   Enabled: true
164 Style/ReturnNil:
165   Enabled: true
167 Style/Send:
168   Enabled: true
170 Style/SingleLineBlockParams:
171   Enabled: true
173 Style/StringMethods:
174   Enabled: true
176 Style/SymbolArray:
177   EnforcedStyle: brackets
179 Style/TrailingCommaInArguments:
180   EnforcedStyleForMultiline: no_comma
182 Style/TrailingCommaInArrayLiteral:
183   EnforcedStyleForMultiline: consistent_comma
185 Style/TrailingCommaInHashLiteral:
186   EnforcedStyleForMultiline: consistent_comma
188 Style/WordArray:
189   EnforcedStyle: brackets