This repository has been archived by the owner on May 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.rubocop.yml
97 lines (78 loc) · 2.68 KB
/
.rubocop.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
inherit_from: rubocop-todo.yml
AllCops:
Excludes:
- 'config/**'
- 'db/**'
- 'script/**'
- 'tmp/**'
- 'vendor/**'
- 'spec/fixtures/*.rb'
- 'spec/dummy/**'
RunRailsCops: true
# Use UTF-8 as the source file encoding.
Encoding:
Enabled: false
# Limit lines to 80 characters.
LineLength:
Max: 120
# Avoid methods longer than 10 lines of code
MethodLength:
CountComments: false # count full line comments?
Max: 20
BracesAroundHashParameters:
Enabled: false
SpaceInsideBlockBraces:
EnforcedStyle: space
EnforcedStyleForEmptyBraces: space
AmbiguousRegexpLiteral:
Exclude:
- 'spec/**'
CyclomaticComplexity:
Max: 15 # should be set to 6, too many for now
################################################################## DISABLED COPS
# These cops are disabled because we think they are a Bad Idea. If you add one
# here, make sure to add a comment describing what the cop does, and why this
# is a bad idea.
# Forces the argument names of the block given to #reduce to be `a, e`. Only
# applies on single-line blocks, but why would we want to force people to use
# less descriptive names?
SingleLineBlockParams:
Enabled: false
# Complains than multiline ternary expressions should be if/else statements
# Ternary are still often more readable.
MultilineTernaryOperator:
Enabled: false
# disallows `class Quby::Items::Text` style definitions.
# Why waste all that indentation?
ClassAndModuleChildren:
Enabled: false
# This is not universally a better idea, it depends greatly on whether the
# condition is to handle an edge-case or not. We prefer leaving this up to
# code review instead of Rubocop.
IfUnlessModifier:
Enabled: false
# before_filter must be renamed to before_action.
# can't enable this until we drop support for rails 3.
ActionFilter:
Enabled: false
# Use single quotes for strings that don't do string interpolation. Makes it
# harder to later add an interpolated value.
StringLiterals:
Enabled: false
# This forces the use of the English library instead of $: etc. We think that some
# of these Perl-vars are quite succinct.
SpecialGlobalVars:
Enabled: false
# This forces the use of %r{.. } when a regexp contains more than one slash.
# If a regex is unreadable, code review will catch it, otherwise it's not
# a function of how many slashes are in it.
RegexpLiteral:
Enabled: false
# Requires you a space inside the braces of a Hash literal. I have never ever done this before and
# do not think it makes for more readable code.
SpaceInsideHashLiteralBraces:
Enabled: false
# can only use %w(..)
# Stupid rule, the whole idea of the %w is to be able to use something that will not be in the string.
PercentLiteralDelimiters:
Enabled: false