forked from AgileVentures/shf-project
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.rubocop.yml
116 lines (85 loc) · 3.92 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
inherit_from: .rubocop_todo.yml
AllCops:
NewCops: enable
#AllCops:
# DisabledByDefault: true
require:
- rubocop-rails
- rubocop-rspec
- rubocop-rake
- rubocop-performance
# ================================================================================
# ================================================================================
#
# PROJECT SPECIFIC SETTINGS THAT ARE DIFFERENT FROM THE RUBOCOP DEFAULTS
#
# ================================================================================
# ================================================================================
# -------------------------------------------------------------------------------------------
# BUNDLER
# -------------------------------------------------------------------------------------------
# We would rather order gems by general categories or date added
Bundler/OrderedGems:
Enabled: false
# -------------------------------------------------------------------------------------------
# LAYOUT
# -------------------------------------------------------------------------------------------
# Modern terminals (and printers) can handle long lines. Individual developers can adjust their editors to wrap lines or not as they choose. Artificially chopping long lines up into smaller ones is ugly.
Layout/LineLength:
Enabled: false
# In the Ruby style guide, 'when' indentation is based on the fact that a case statement is not a block.
# But this is a technical reason, not a readability or comprehension reason.
# 'When' statements are related to and come "under" a case statement, so they should be indented.
Layout/CaseIndentation:
IndentOneStep: true
# @todo When we upgrade to rubocop >= 1.24, use this:
#Layout/CommentIndentation:
# AllowForAlignment: true
# It can be helpful to have multiple empty lines to set off 'major' groups of code.
# Ex: Using 2 blank lines between methods and single lines within a method creates a
# visual grouping of methods: there is a larger space between methods,
# making it easy to see a method as a single visual unit.
Layout/EmptyLines:
Enabled: false
# Having an empty line after the class name makes the class name stand out
Layout/EmptyLinesAroundClassBody:
EnforcedStyle: beginning_only
# Group namespaces together. It's ok to use empty lines around them to make them stand out
Layout/EmptyLinesAroundModuleBody:
EnforcedStyle: empty_lines_except_namespace
# -------------------------------------------------------------------------------------------
# NAMING
# -------------------------------------------------------------------------------------------
# Don't worry about file names in the docs directory.
Naming/FileName:
Exclude:
- 'docs/**/*'
# Using "e" as the preferred exception name is too short and does not convey meaningful information.
Naming/RescuedExceptionsVariableName:
PreferredName: 'exception'
# -------------------------------------------------------------------------------------------
# PERFORMANCE
# -------------------------------------------------------------------------------------------
# It's ok to use a Regexp in the Gemfile with a literal Ex: /aarch/
Performance/StringInclude:
Exclude:
- 'Gemfile'
# It's ok to use =~ with a Regexp in the Gemfile Ex: =~ /aarch/
Performance/RegexpMatch:
Exclude:
- 'Gemfile'
# -------------------------------------------------------------------------------------------
# STYLE
# -------------------------------------------------------------------------------------------
# yard picks up on annotations starting with '@' and are NOT followed by a colon (:).
# If creating documentation with yard, we should use comment annotations that start with @
# Do not allow the keyword "HACK". Either something should be fixed (@todo or @fixme) or
# write a @note or comment about why it is the way it is.
Style/CommentAnnotation:
RequireColon: false
Keywords:
- '@todo'
- '@fixme'
- '@review'
- '@note'
- '@optimize'