|
12 | 12 | # See the License for the specific language governing permissions and |
13 | 13 | # limitations under the License. |
14 | 14 |
|
| 15 | +# RubyCop configuration file |
| 16 | +# |
| 17 | +# RuboCop |
| 18 | +# http://batsov.com/rubocop/ |
| 19 | +# |
| 20 | +# Style cops |
| 21 | +# http://www.rubydoc.info/gems/rubocop/RuboCop/Cop/Style |
| 22 | +# |
| 23 | +# Lint cops |
| 24 | +# http://www.rubydoc.info/gems/rubocop/RuboCop/Cop/Lint |
| 25 | + |
| 26 | +# Prefer double quotes for consistency (regardless of interpolation) |
15 | 27 | Style/StringLiterals: |
16 | 28 | EnforcedStyle: double_quotes |
| 29 | + |
| 30 | +# Prefer no parentheses for method definitions and invocations |
17 | 31 | Style/MethodDefParentheses: |
18 | 32 | EnforcedStyle: require_no_parentheses |
| 33 | + |
| 34 | +# Use %[ ] for string arrays |
| 35 | +# Use %{ } for other delimiters, eg. %{ } sometimes used for multiline strings |
| 36 | +Style/PercentLiteralDelimiters: |
| 37 | + Enabled: false |
| 38 | + |
| 39 | +# Always use 2 spaces for indentation |
| 40 | +# Sometimes method invokations might be additionally indented for clarity |
| 41 | +Style/MultilineMethodCallIndentation: |
| 42 | + Enabled: false |
| 43 | + |
| 44 | +# Unused block arguments are OK |
| 45 | +# They can add clarity to code to demonstrate available arguments |
| 46 | +Lint/UnusedBlockArgument: |
| 47 | + Enabled: false |
| 48 | + |
| 49 | +# Usage of // or %r{ } is acceptable for regular expressions |
| 50 | +# Please use // unless %r{ } adds clarity, eg. slashes used in expression |
| 51 | +Style/RegexpLiteral: |
| 52 | + Enabled: false |
| 53 | + |
| 54 | +# Use of parenthesis is optional in nested method calls |
| 55 | +# This cop is optional mostly to support RSpec expectations |
| 56 | +# If the code sample is: service.add "variable" |
| 57 | +# Then the spec can use: expect { service.add "variable" } |
| 58 | +Style/NestedParenthesizedCalls: |
| 59 | + Enabled: false |
| 60 | + |
| 61 | +# In production code, yield is prefered over block.call |
| 62 | +# For code samples, explicitly calling a block by name can add clarity |
| 63 | +Performance/RedundantBlockCall: |
| 64 | + Enabled: false |
| 65 | + |
| 66 | +# Empty line at top of block is sometimes OK, eg. for RSpec describe blocks |
| 67 | +Style/EmptyLinesAroundBlockBody: |
| 68 | + Enabled: false |
| 69 | + |
19 | 70 | Style/NumericLiterals: |
20 | 71 | Enabled: false |
21 | 72 | Style/SpaceAroundOperators: |
|
0 commit comments