-
Notifications
You must be signed in to change notification settings - Fork 0
/
.rubocop.yml
52 lines (47 loc) · 1.29 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
inherit_from: .rubocop_todo.yml
AllCops:
Exclude:
# there is no reason to test external files
- "roles.galaxy/**/*"
- "vendor/**/*"
- "tests/integration/**/roles/*"
- "extra_roles/**/*"
- "qansible"
# enable detailed explanations available in cops
# the default output is not enough to understand what is wrong
DisplayCopNames: true
ExtraDetails: true
DisplayStyleGuide: true
Style/StringLiterals:
# https://github.com/reallyenglish/ansible-role-example/issues/60#issuecomment-280573231
EnforcedStyle: double_quotes
Style/SymbolArray:
# perefer brackets for `grep-ability`
EnforcedStyle: brackets
Metrics/BlockLength:
Exclude:
# Vagrantfile is not application code, rather, configuration file and
# blocks in it tends to be long
- "**/Vagrantfile"
ExcludedMethods:
# these two exclude long blocks in `_spec.rb`
- describe
- context
Metrics/LineLength:
Exclude:
# `_spec.rb` often contains one-liner shell command
- "**/*_spec.rb"
# same as in Metrics/BlockLength
- "**/Vagrantfile"
# Gemfile is not application code
- "Gemfile"
# ignore heredoc for readability
AllowHeredoc: true
# URLs are almost always long
AllowURI: true
URISchemes:
- http
- https
- git
- ftp
IgnoreCopDirectives: true