Skip to content

Commit d0229fe

Browse files
committed
Add Rubocop gem / config
1 parent 8adc300 commit d0229fe

File tree

3 files changed

+79
-0
lines changed

3 files changed

+79
-0
lines changed

.rubocop.yml

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Common configuration.
2+
AllCops:
3+
# Include common Ruby source files.
4+
Include:
5+
- '**/*.gemspec'
6+
- '**/*.podspec'
7+
- '**/*.jbuilder'
8+
- '**/*.rake'
9+
- '**/*.opal'
10+
- '**/config.ru'
11+
- '**/Gemfile'
12+
- '**/Rakefile'
13+
- '**/Capfile'
14+
- '**/Podfile'
15+
- '**/Thorfile'
16+
- '**/Vagrantfile'
17+
- '**/Berksfile'
18+
- '**/Cheffile'
19+
- '**/Vagabondfile'
20+
Exclude:
21+
- 'vendor/**/*'
22+
- 'config/**/*'
23+
- 'db/**/*'
24+
- 'Gemfile*'
25+
- 'bin/**/*'
26+
- 'Guardfile*'
27+
28+
# Cop names are not displayed in offense messages by default. Change behavior
29+
# by overriding DisplayCopNames, or by giving the -D/--display-cop-names
30+
# option.
31+
DisplayCopNames: true
32+
# Style guide URLs are not displayed in offense messages by default. Change
33+
# behavior by overriding DisplayStyleGuide, or by giving the
34+
# -S/--display-style-guide option.
35+
DisplayStyleGuide: true
36+
# Additional cops that do not reference a style guide rule may be enabled by
37+
# default. Change behavior by overriding StyleGuideCopsOnly, or by giving
38+
# the --only-guide-cops option.
39+
StyleGuideCopsOnly: false
40+
# All cops except the ones in disabled.yml are enabled by default. Change
41+
# this behavior by overriding DisabledByDefault. When DisabledByDefault is
42+
# true, all cops in the default configuration are disabled, and and only cops
43+
# in user configuration are enabled. This makes cops opt-in instead of
44+
# opt-out. Note that when DisabledByDefault is true, cops in user
45+
# configuration will be enabled even if they don't set the Enabled parameter.
46+
DisabledByDefault: false
47+
# Enables the result cache if true. Can be overridden by the --cache command
48+
# line option.
49+
UseCache: true
50+
# Threshold for how many files can be stored in the result cache before some
51+
# of the files are automatically removed.
52+
MaxFilesInCache: 20000
53+
# The cache will be stored in "rubocop_cache" under this directory. The name
54+
# "/tmp" is special and will be converted to the system temporary directory,
55+
# which is "/tmp" on Unix-like systems, but could be something else on other
56+
# systems.
57+
CacheRootDirectory: /tmp
58+
59+
Metrics/LineLength:
60+
Max: 80
61+
62+
Style/Documentation:
63+
Enabled: false
64+
65+
Style/StringLiterals:
66+
Enabled: false

Gemfile

+1
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
source "https://rubygems.org"
44

55
gem 'rspec'
6+
gem 'rubocop'

Gemfile.lock

+12
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4+
ast (2.2.0)
45
diff-lcs (1.2.5)
6+
parser (2.3.0.2)
7+
ast (~> 2.2)
8+
powerpack (0.1.1)
9+
rainbow (2.1.0)
510
rspec (3.4.0)
611
rspec-core (~> 3.4.0)
712
rspec-expectations (~> 3.4.0)
@@ -15,12 +20,19 @@ GEM
1520
diff-lcs (>= 1.2.0, < 2.0)
1621
rspec-support (~> 3.4.0)
1722
rspec-support (3.4.1)
23+
rubocop (0.36.0)
24+
parser (>= 2.3.0.0, < 3.0)
25+
powerpack (~> 0.1)
26+
rainbow (>= 1.99.1, < 3.0)
27+
ruby-progressbar (~> 1.7)
28+
ruby-progressbar (1.7.5)
1829

1930
PLATFORMS
2031
ruby
2132

2233
DEPENDENCIES
2334
rspec
35+
rubocop
2436

2537
BUNDLED WITH
2638
1.12.5

0 commit comments

Comments
 (0)