-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrubocop.yml
66 lines (58 loc) · 2.11 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
require:
- rubocop-performance
AllCops:
NewCops: enable
Exclude:
- node_modules/**/*
- vendor/**/*
Gemspec/DevelopmentDependencies:
EnforcedStyle: gemspec
Layout/MultilineArrayLineBreaks:
Enabled: true
Layout/MultilineHashKeyLineBreaks:
Enabled: true
Layout/MultilineMethodArgumentLineBreaks:
Enabled: true
AllowMultilineFinalElement: true
Layout/MultilineMethodParameterLineBreaks:
Enabled: true
AllowMultilineFinalElement: true
Lint/UnusedBlockArgument:
AutoCorrect: false # force the engineer to think about how come it's unused, instead of silently _ prefixing it
Lint/UnusedMethodArgument:
AllowUnusedKeywordArguments: true # there's no way to mark a kwarg as unused
AutoCorrect: false # force the engineer to think about how come it's unused, instead of silently _ prefixing it
Metrics:
Enabled: false # SnR is just too low to have this enabled by default
Naming/HeredocDelimiterNaming:
ForbiddenDelimiters:
# negative regex - these are the _allowed_ delimiters
# any you add should describe the format of the data, not describe
# what the data is for. this allows editors to syntax highlight
- ^(?!AST|BASE64|CSV|GQL|HTML|JINJA|JS|MD|PEM|REGEX|RUBY|SH|SQL|SRT|TEXT|TF|XML|YAML|PATTERN).+$
Performance/Casecmp:
Enabled: false # casecmp(other).zero? is a bad suggestion because it's not Unicode-aware (also it's less clear)
Style/Alias:
EnforcedStyle: prefer_alias_method # https://github.com/rubocop/ruby-style-guide/issues/821
Style/DateTime:
Enabled: true
Style/EmptyElse:
EnforcedStyle: empty # explicit nil indicates programmer intent
Style/FormatStringToken:
EnforcedStyle: template
Style/HashSyntax:
EnforcedStyle: ruby19_no_mixed_keys
Style/PercentQLiterals:
EnforcedStyle: upper_case_q
Style/PerlBackrefs:
Enabled: false # Regexp.last_match(1) is far worse than $1
Style/RescueStandardError:
EnforcedStyle: implicit
Style/SafeNavigationChainLength:
Enabled: false # kind of Metrics-y
Style/StringLiterals:
EnforcedStyle: double_quotes
Style/StringLiteralsInInterpolation:
EnforcedStyle: double_quotes
Style/TernaryParentheses:
EnforcedStyle: require_parentheses_when_complex