rubocopital 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: f6f8da48a68128c440f206fab4fc9300aa2882a44c0399e98f0d93aa4daf7c98
4
+ data.tar.gz: 37f431b740f81ff4446fa844dd38d2caac24191f27dea0175afae89e236c9670
5
+ SHA512:
6
+ metadata.gz: 7de2e6d1a9d8b9075e35544ab838e3342742db34c72f31bbbf01732803d7d4b41b1a375b4a2db38e5cf68e860bcb09e11c84bd6c065034c355dd3ce77958ac81
7
+ data.tar.gz: ad32859b681c2db76fce59c84509510528c2e0b598cd21c047f0f7aa396a32e042ef8b5fd15b2abbeaefa83fe39b04c9072a248ad0c4945edcfc9fc6864fcb55
@@ -0,0 +1,12 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+
11
+ # rspec failure tracking
12
+ .rspec_status
@@ -0,0 +1,37 @@
1
+ stages:
2
+ - test
3
+
4
+ test_ruby_2_2:
5
+ image: ruby:2.2.10
6
+ stage: test
7
+ script:
8
+ - bundle install
9
+ - bundle exec rake
10
+
11
+ test_ruby_2_3:
12
+ image: ruby:2.3.7
13
+ stage: test
14
+ script:
15
+ - bundle install
16
+ - bundle exec rake
17
+
18
+ test_ruby_2_4:
19
+ image: ruby:2.4.4
20
+ stage: test
21
+ script:
22
+ - bundle install
23
+ - bundle exec rake
24
+
25
+ test_ruby_2_5:
26
+ image: ruby:2.5.1
27
+ stage: test
28
+ script:
29
+ - bundle install
30
+ - bundle exec rake
31
+
32
+ test_ruby_2_6:
33
+ image: ruby:2.6-rc
34
+ stage: test
35
+ script:
36
+ - bundle install
37
+ - bundle exec rake
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --color
@@ -0,0 +1,232 @@
1
+ require: rubocop-rspec
2
+
3
+ Capybara/CurrentPathExpectation:
4
+ Enabled: true
5
+
6
+ Capybara/FeatureMethods:
7
+ Enabled: true
8
+
9
+ FactoryBot/AttributeDefinedStatically:
10
+ Enabled: true
11
+
12
+ FactoryBot/CreateList:
13
+ Enabled: true
14
+ EnforcedStyle: create_list
15
+
16
+ Rails/HttpStatus:
17
+ Enabled: true
18
+ EnforcedStyle: symbolic
19
+
20
+ RSpec/AlignLeftLetBrace:
21
+ Enabled: false
22
+
23
+ RSpec/AlignRightLetBrace:
24
+ Enabled: false
25
+
26
+ RSpec/AnyInstance:
27
+ Enabled: true
28
+
29
+ RSpec/AroundBlock:
30
+ Enabled: true
31
+
32
+ RSpec/Be:
33
+ Enabled: true
34
+
35
+ RSpec/BeEql:
36
+ Enabled: true
37
+
38
+ RSpec/BeforeAfterAll:
39
+ Enabled: true
40
+
41
+ RSpec/ContextWording:
42
+ Enabled: true
43
+
44
+ RSpec/DescribeClass:
45
+ Enabled: true
46
+
47
+ RSpec/DescribeSymbol:
48
+ Enabled: true
49
+
50
+ RSpec/DescribedClass:
51
+ Enabled: true
52
+ EnforcedStyle: described_class
53
+
54
+ RSpec/DescribeMethod:
55
+ Enabled: true
56
+
57
+ RSpec/EmptyExampleGroup:
58
+ Enabled: true
59
+
60
+ RSpec/EmptyLineAfterExampleGroup:
61
+ Enabled: true
62
+
63
+ RSpec/EmptyLineAfterFinalLet:
64
+ Enabled: true
65
+
66
+ RSpec/EmptyLineAfterHook:
67
+ Enabled: true
68
+
69
+ RSpec/EmptyLineAfterSubject:
70
+ Enabled: true
71
+
72
+ RSpec/ExampleLength:
73
+ Enabled: true
74
+ Max: 5
75
+
76
+ RSpec/ExampleWithoutDescription:
77
+ Enabled: true
78
+ EnforcedStyle: single_line_only
79
+
80
+ RSpec/ExampleWording:
81
+ Enabled: true
82
+
83
+ RSpec/ExpectActual:
84
+ Enabled: true
85
+
86
+ RSpec/ExpectChange:
87
+ Enabled: true
88
+ EnforcedStyle: block
89
+
90
+ RSpec/ExpectInHook:
91
+ Enabled: true
92
+
93
+ RSpec/ExpectOutput:
94
+ Enabled: true
95
+
96
+ RSpec/FilePath:
97
+ Enabled: true
98
+ IgnoreMethods: false
99
+
100
+ RSpec/Focus:
101
+ Enabled: true
102
+
103
+ RSpec/HookArgument:
104
+ Enabled: true
105
+ EnforcedStyle: implicit
106
+
107
+ RSpec/HooksBeforeExamples:
108
+ Enabled: true
109
+
110
+ RSpec/ImplicitExpect:
111
+ Enabled: true
112
+ EnforcedStyle: is_expected
113
+
114
+ RSpec/ImplicitSubject:
115
+ Enabled: true
116
+ EnforcedStyle: single_line_only
117
+
118
+ RSpec/InstanceSpy:
119
+ Enabled: true
120
+
121
+ RSpec/InstanceVariable:
122
+ AssignmentOnly: true
123
+ Enabled: true
124
+
125
+ RSpec/InvalidPredicateMatcher:
126
+ Enabled: true
127
+
128
+ RSpec/ItBehavesLike:
129
+ Enabled: true
130
+ EnforcedStyle: it_behaves_like
131
+
132
+ RSpec/IteratedExpectation:
133
+ Enabled: true
134
+
135
+ RSpec/LeadingSubject:
136
+ Enabled: true
137
+
138
+ RSpec/LetBeforeExamples:
139
+ Enabled: true
140
+
141
+ RSpec/LetSetup:
142
+ Enabled: true
143
+
144
+ RSpec/MessageChain:
145
+ Enabled: false
146
+
147
+ RSpec/MessageSpies:
148
+ Enabled: true
149
+ EnforcedStyle: receive
150
+
151
+ RSpec/MessageExpectation:
152
+ Enabled: false
153
+
154
+ RSpec/MissingExampleGroupArgument:
155
+ Enabled: true
156
+
157
+ RSpec/MultipleDescribes:
158
+ Enabled: true
159
+
160
+ RSpec/MultipleExpectations:
161
+ Enabled: true
162
+ Max: 5
163
+
164
+ RSpec/MultipleSubjects:
165
+ Enabled: true
166
+
167
+ RSpec/NamedSubject:
168
+ Enabled: false
169
+
170
+ RSpec/NestedGroups:
171
+ Enabled: true
172
+ Max: 5
173
+
174
+ RSpec/NotToNot:
175
+ Enabled: false
176
+
177
+ RSpec/OverwritingSetup:
178
+ Enabled: true
179
+
180
+ RSpec/Pending:
181
+ Enabled: true
182
+
183
+ RSpec/PredicateMatcher:
184
+ Enabled: true
185
+ EnforcedStyle: inflected
186
+ Strict: true
187
+
188
+ RSpec/ReceiveCounts:
189
+ Enabled: false
190
+
191
+ RSpec/ReceiveNever:
192
+ Enabled: true
193
+
194
+ RSpec/RepeatedDescription:
195
+ Enabled: true
196
+
197
+ RSpec/RepeatedExample:
198
+ Enabled: true
199
+
200
+ RSpec/ReturnFromStub:
201
+ Enabled: true
202
+ EnforcedStyle: and_return
203
+
204
+ RSpec/ScatteredLet:
205
+ Enabled: true
206
+
207
+ RSpec/ScatteredSetup:
208
+ Enabled: true
209
+
210
+ RSpec/SharedContext:
211
+ Enabled: true
212
+
213
+ RSpec/SharedExamples:
214
+ Enabled: true
215
+
216
+ RSpec/SingleArgumentMessageChain:
217
+ Enabled: true
218
+
219
+ RSpec/SubjectStub:
220
+ Enabled: true
221
+
222
+ RSpec/UnspecifiedException:
223
+ Enabled: true
224
+
225
+ RSpec/VerifiedDoubles:
226
+ Enabled: true
227
+
228
+ RSpec/VoidExpect:
229
+ Enabled: true
230
+
231
+ RSpec/Yield:
232
+ Enabled: true
@@ -0,0 +1,4 @@
1
+ inherit_from: default.yml
2
+
3
+ Documentation:
4
+ Enabled: false
@@ -0,0 +1,5 @@
1
+ sudo: false
2
+ language: ruby
3
+ rvm:
4
+ - 2.4.1
5
+ before_install: gem install bundler -v 1.15.4
@@ -0,0 +1,187 @@
1
+ # Changelog
2
+ All notable changes to this project will be documented in this file.
3
+
4
+ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
5
+ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
6
+
7
+ ## [Unreleased]
8
+
9
+ ## [0.5.1] - 30 July 2019
10
+
11
+ ### Disabled
12
+
13
+ - Disabled the cop `Rails/LexicallyScopedActionFilter`
14
+
15
+ ---
16
+
17
+ ## [0.5.0] - 7 May 2019
18
+
19
+ ### Changed
20
+
21
+ - Bumped rubocop to version `0.67.2`
22
+
23
+ ---
24
+
25
+ ## [0.4.0] - 8 April 2019
26
+
27
+ ### Added
28
+
29
+ - Added rubocop-rspec version `1.32.0`
30
+ - Added the cop `Capybara/CurrentPathExpectation`
31
+ - Added the cop `Capybara/FeatureMethods`
32
+ - Added the cop `FactoryBot/AttributeDefinedStatically`
33
+ - Added the cop `FactoryBot/CreateList` with `EnforcedStyle: create_list`
34
+ - Added the cop `Rails/HttpStatus` with `EnforcedStyle: symbolic`
35
+ - Added the cop `RSpec/AnyInstance`
36
+ - Added the cop `RSpec/AroundBlock`
37
+ - Added the cop `RSpec/Be`
38
+ - Added the cop `RSpec/BeEql`
39
+ - Added the cop `RSpec/BeforeAfterAll`
40
+ - Added the cop `RSpec/ContextWording`
41
+ - Added the cop `RSpec/DescribeClass`
42
+ - Added the cop `RSpec/DescribeSymbol`
43
+ - Added the cop `RSpec/DescribedClass` with `EnforcedStyle: described_class`
44
+ - Added the cop `RSpec/DescribeMethod`
45
+ - Added the cop `RSpec/EmptyExampleGroup`
46
+ - Added the cop `RSpec/EmptyLineAfterExampleGroup`
47
+ - Added the cop `RSpec/EmptyLineAfterFinalLet`
48
+ - Added the cop `RSpec/EmptyLineAfterHook`
49
+ - Added the cop `RSpec/EmptyLineAfterSubject`
50
+ - Added the cop `RSpec/ExampleLength` with `Max: 5`
51
+ - Added the cop `RSpec/ExampleWithoutDescription` with `EnforcedStyle: single_line_only`
52
+ - Added the cop `RSpec/ExampleWording`
53
+ - Added the cop `RSpec/ExpectActual`
54
+ - Added the cop `RSpec/ExpectChange` with `EnforcedStyle: block`
55
+ - Added the cop `RSpec/ExpectInHook`
56
+ - Added the cop `RSpec/ExpectOutput`
57
+ - Added the cop `RSpec/FilePath` with `IgnoreMethods: false`
58
+ - Added the cop `RSpec/Focus`
59
+ - Added the cop `RSpec/HookArgument` with `EnforcedStyle: implicit`
60
+ - Added the cop `RSpec/HooksBeforeExamples`
61
+ - Added the cop `RSpec/ImplicitExpect` with `EnforcedStyle: is_expected`
62
+ - Added the cop `RSpec/ImplicitSubject` with `EnforcedStyle: single_line_only`
63
+ - Added the cop `RSpec/InstanceSpy`
64
+ - Added the cop `RSpec/InstanceVariable` with `AssignmentOnly: true`
65
+ - Added the cop `RSpec/InvalidPredicateMatcher`
66
+ - Added the cop `RSpec/ItBehavesLike` with `EnforcedStyle: it_behaves_like`
67
+ - Added the cop `RSpec/IteratedExpectation`
68
+ - Added the cop `RSpec/LeadingSubject`
69
+ - Added the cop `RSpec/LetBeforeExamples`
70
+ - Added the cop `RSpec/LetSetup`
71
+ - Added the cop `RSpec/MessageSpies` with `EnforcedStyle: receive`
72
+ - Added the cop `RSpec/MissingExampleGroupArgument`
73
+ - Added the cop `RSpec/MultipleDescribes`
74
+ - Added the cop `RSpec/MultipleExpectations` with `Max: 5`
75
+ - Added the cop `RSpec/MultipleSubjects`
76
+ - Added the cop `RSpec/NestedGroups` with `Max: 5`
77
+ - Added the cop `RSpec/OverwritingSetup`
78
+ - Added the cop `RSpec/Pending`
79
+ - Added the cop `RSpec/PredicateMatcher` with `EnforcedStyle: inflected` and `Strict: true`
80
+ - Added the cop `RSpec/ReceiveNever`
81
+ - Added the cop `RSpec/RepeatedDescription`
82
+ - Added the cop `RSpec/RepeatedExample`
83
+ - Added the cop `RSpec/ReturnFromStub` with `EnforcedStyle: and_return`
84
+ - Added the cop `RSpec/ScatteredLet`
85
+ - Added the cop `RSpec/ScatteredSetup`
86
+ - Added the cop `RSpec/SharedContext`
87
+ - Added the cop `RSpec/SharedExamples`
88
+ - Added the cop `RSpec/SingleArgumentMessageChain`
89
+ - Added the cop `RSpec/SubjectStub`
90
+ - Added the cop `RSpec/UnspecifiedException`
91
+ - Added the cop `RSpec/VerifiedDoubles`
92
+ - Added the cop `RSpec/VoidExpect`
93
+ - Added the cop `RSpec/Yield`
94
+
95
+ ---
96
+
97
+ ## [0.3.1] - 25 January 2019
98
+
99
+ ### Added
100
+
101
+ - Added the cop `Rails/BelongsTo`
102
+ - Added the cop `Rails/IgnoredSkipActionFilterOption`
103
+ - Added the cop `Rails/LinkToBlank`
104
+ - Added the cop `Style/DisjunctiveAssignmentInConstructor`
105
+
106
+ ### Changed
107
+ - Bumped rubocop to version `0.63.0`
108
+
109
+ ---
110
+
111
+ ## [0.3.0] - 18 December 2018
112
+
113
+ ### Added
114
+ - Added the cop `Performance/ChainArrayAllocation`
115
+ - Added the cop `Performance/OpenStruct`
116
+ - Added the cop `Style/IpAddresses`
117
+ - Added the cop `Style/MultilineMethodSignature`
118
+
119
+ ### Changed
120
+ - Bumped rubocop to version `0.61.1`
121
+
122
+ ---
123
+
124
+ ## [0.2.0] - 24 July 2018
125
+
126
+ ### Added
127
+
128
+ - Added the cop `Layout/ClosingHeredocIndentation`
129
+ - Added the cop `Layout/LeadingBlankLines`
130
+ - Added the cop `Lint/ErbNewArguments`
131
+ - Added the cop `Lint/SafeNavigationConsistency`
132
+ - Added the cop `Lint/SplatKeywordArguments`
133
+ - Added the cop `Performance/InefficientHashSearch`
134
+ - Added the cop `Performance/UnneededSort`
135
+ - Added the cop `Rails/AssertNot`
136
+ - Added the cop `Rails/BulkChangeTable`
137
+ - Added the cop `Rails/HttpStatus`
138
+ - Added the cop `Rails/RefuteMethods`
139
+ - Added the cop `Style/AccessModifierDeclarations`
140
+ - Added the cop `Style/MethodMissingSuper`
141
+ - Added the cop `Style/MissingRespondToMissing`
142
+ - Added the cop `Style/UnneededCondition`
143
+
144
+ ### Disabled
145
+
146
+ - Disabled the cop `Style/UnpackFirst`
147
+
148
+ ### Changed
149
+
150
+ - Bumped rubocop to version `0.57.2`
151
+ - `Style/MethodMissing` is now enabled
152
+
153
+ ---
154
+
155
+ ## [0.1.8] - 20 March 2018
156
+
157
+ ### Added
158
+
159
+ - Re-enable `Style/FrozenStringLiteralComment` cop to be YC compliant
160
+ - Add `training` and `review` as valid environments for the `Rails/UnknownEnv` cop
161
+
162
+ ## [0.1.7] - 15 March 2018
163
+
164
+ ### Added
165
+
166
+ - We don't care that much about `Style/FrozenStringLiteralComment`. Disabled the cop.
167
+
168
+ ### Changed
169
+
170
+ - Moved `Lint/EndAlignment` to the new namespace: `Layout/EndAlignment`
171
+
172
+ ## [0.1.6] - 15 March 2018
173
+
174
+ ### Changed
175
+
176
+ - Removed the `Style/Encoding: EnforcedStyle` option because it's removed
177
+
178
+ ## [0.1.5] - 15 March 2018
179
+
180
+ ### Added
181
+
182
+ - Introduced the Changelog
183
+
184
+ ### Changed
185
+ - Updated Rubocop version to 0.53
186
+
187
+ ---
data/Gemfile ADDED
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
4
+
5
+ git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
6
+
7
+ # Specify your gem's dependencies in rubocopital.gemspec
8
+ gemspec
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2017 Peter de Ruijter
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,72 @@
1
+ # Rubocopital
2
+
3
+ This is the common configuration for ruby-style checks by [Rubocop](https://github.com/bbatsov/rubocop).
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile under the `development` and `test` groups to include a specific version of this gem:
8
+
9
+ ```ruby
10
+ gem 'rubocopital', git: 'git@gitlab.ycdev.nl:youngcapital/rubocopital.git', tag: '0.5.1', require: false
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ $ bundle install
16
+
17
+ ## Usage
18
+
19
+ To use shared rubocop configuration in your respective app, you should include
20
+ rubocopital's configuration like this:
21
+
22
+ ```
23
+ inherit_gem:
24
+ rubocopital:
25
+ - default.yml
26
+ ```
27
+
28
+ If you have specific configurations that differ from the agreed upon defaults,
29
+ you can just add them below.
30
+
31
+ ```
32
+ inherit_gem:
33
+ rubocopital:
34
+ - default.yml
35
+
36
+ AllCops:
37
+ TargetRubyVersion: 2.3
38
+ DisplayCopNames: false
39
+ DisplayStyleGuide: true
40
+ ```
41
+
42
+ If your project uses RSpec, please add the `rubocop-rspec` config as well.
43
+
44
+ ```
45
+ inherit_gem:
46
+ rubocopital:
47
+ - default.yml
48
+ - .rubocop-rspec.yml
49
+ ```
50
+
51
+ ## Development
52
+
53
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run
54
+ `rake` to run the tests and the style checks. You can also run `bin/console` for an interactive
55
+ prompt that will allow you to experiment.
56
+
57
+ To install this gem onto your local machine, run `bundle exec rake install`.
58
+ To release a new version, update the version number in `version.rb`, and then
59
+ run `git tag -a vX.Y.Z -m "Your Message"` and `git push origin vX.Y.Z`.
60
+
61
+ ## Contributing
62
+
63
+ ## License
64
+
65
+ The gem is available as open source under the terms of the
66
+ [MIT License](http://opensource.org/licenses/MIT).
67
+
68
+ ## Code of Conduct
69
+
70
+ Everyone interacting in the Rubocopital project’s codebases, issue trackers,
71
+ chat rooms and mailing lists is expected to follow the
72
+ [code of conduct](https://gitlab.ycdev.nl/youngcapital/rubocopital/blob/master/CODE_OF_CONDUCT.md).
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'bundler/gem_tasks'
4
+ require 'rspec/core/rake_task'
5
+ require 'rubocop/rake_task'
6
+
7
+ RSpec::Core::RakeTask.new(:spec)
8
+ RuboCop::RakeTask.new(:rubocop)
9
+
10
+ task default: %i[spec rubocop]
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require 'bundler/setup'
5
+ require 'rubocopital'
6
+
7
+ # You can add fixtures and/or initialization code here to make experimenting
8
+ # with your gem easier. You can also use a different console, if you like.
9
+
10
+ # (If you use this, don't forget to add pry to your Gemfile!)
11
+ # require "pry"
12
+ # Pry.start
13
+
14
+ require 'irb'
15
+ IRB.start(__FILE__)
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,239 @@
1
+ AllCops:
2
+ TargetRubyVersion: 2.3
3
+ Exclude:
4
+ - db/migrate/*
5
+ - db/seeds/*
6
+ - db/schema.rb
7
+ - db/seeds.rb
8
+ - script/**/*
9
+ - bin/**/*
10
+ - vendor/**/*
11
+ - test/**/*
12
+ - features/**/*
13
+ - Gemfile
14
+ - Gemfile.lock
15
+ - node_modules/**/*
16
+ - app/channels/application_cable/*
17
+ - config/environments/development.rb
18
+ - config/spring.rb
19
+ - config/application.rb
20
+ DisplayCopNames: true
21
+ DisplayStyleGuide: true
22
+
23
+ Layout/AlignHash:
24
+ EnforcedHashRocketStyle: key
25
+ # key - left alignment of keys
26
+ # 'a' => 2
27
+ # 'bb' => 3
28
+ EnforcedColonStyle: key
29
+ # key - left alignment of keys
30
+ # a: 0
31
+ # bb: 1
32
+ # YC Compliant
33
+ EnforcedLastArgumentHashStyle: ignore_implicit
34
+ # ignore_implicit - Ignore only implicit hashes.
35
+ # Accepts:
36
+ # function(a: 1,
37
+ # b: 2)
38
+ # Registers an offense for:
39
+ # function({a: 1,
40
+ # b: 2})
41
+
42
+ Layout/AlignParameters:
43
+ # YC Compliant
44
+ EnforcedStyle: with_fixed_indentation
45
+ # The `with_fixed_indentation` style aligns the following lines with one
46
+ # level of indentation relative to the start of the line with the method call.
47
+ #
48
+ # method_call(a,
49
+ # b)
50
+
51
+ Style/AndOr:
52
+ # YC Compliant
53
+ EnforcedStyle: conditionals
54
+ # `and` and `or` are banned only in conditionals (conditionals)
55
+
56
+ Style/BlockDelimiters:
57
+ # YC Compliant
58
+ EnforcedStyle: line_count_based
59
+ # The `line_count_based` style enforces braces around single line blocks and
60
+ # do..end around multi-line blocks.
61
+ Exclude:
62
+ - spec/**/*
63
+
64
+ Style/ClassAndModuleChildren:
65
+ # YC Compliant
66
+ EnforcedStyle: compact
67
+
68
+ Style/IdenticalConditionalBranches:
69
+ # YC Compliant
70
+ Enabled: false
71
+ # Redirect_to usage in conditionals
72
+
73
+ Style/FrozenStringLiteralComment:
74
+ # Ensure default is followed
75
+ Enabled: true
76
+
77
+ Style/ExpandPathArguments:
78
+ Enabled: false
79
+
80
+ Style/NumericPredicate:
81
+ # YC Compliant
82
+ Enabled: false
83
+ # Use .positive? instead of > 0
84
+ # Use .zero? instead of == 0
85
+ # Use .nonzero? instead of != 0.
86
+
87
+ Style/GlobalVars:
88
+ # YC Compliant
89
+ Enabled: true
90
+ AllowedVariables: [$ASSET_MODE]
91
+ # Do not introduce global variables. (used for cucumber custom_env)
92
+
93
+ Style/EachWithObject:
94
+ # YC Compliant
95
+ Enabled: false
96
+
97
+ Style/UnpackFirst:
98
+ Enabled: false
99
+
100
+ Rails/Date:
101
+ # YC Compliant
102
+ EnforcedStyle: flexible
103
+ # The value `flexible` allows usage of `Date.current`, `Date.yesterday`, etc
104
+ # (but not `Date.today`) which are overridden by ActiveSupport to handle current
105
+ # time zone.
106
+
107
+ Layout/EndAlignment:
108
+ # YC Compliant
109
+ EnforcedStyleAlignWith: variable
110
+
111
+ Layout/MultilineMethodCallIndentation:
112
+ EnforcedStyle: indented
113
+
114
+ Layout/MultilineOperationIndentation:
115
+ # YC Compliant
116
+ EnforcedStyle: indented
117
+
118
+ Style/TrivialAccessors:
119
+ Enabled: true
120
+
121
+ Metrics/AbcSize:
122
+ # YC Compliant
123
+ Enabled: false
124
+
125
+ Metrics/LineLength:
126
+ # YC Compliant
127
+ Max: 120
128
+
129
+ Metrics/BlockLength:
130
+ # YC Compliant
131
+ CountComments: false # count full line comments?
132
+ Max: 50
133
+ Exclude:
134
+ - spec/**/**.rb
135
+ - config/routes.rb
136
+
137
+ Metrics/ClassLength:
138
+ # YC Compliant
139
+ Enabled: false
140
+
141
+ Metrics/MethodLength:
142
+ # YC Compliant
143
+ Max: 30
144
+ Severity: warning
145
+
146
+ Metrics/ModuleLength:
147
+ # YC Compliant
148
+ Enabled: false
149
+
150
+ Performance/ChainArrayAllocation:
151
+ Enabled: true
152
+
153
+ Performance/OpenStruct:
154
+ Enabled: true
155
+
156
+ Documentation:
157
+ # YC Compliant
158
+ Enabled: false
159
+
160
+ Rails:
161
+ # YC Compliant
162
+ Enabled: true
163
+
164
+ Bundler/OrderedGems:
165
+ # YC Compliant
166
+ TreatCommentsAsGroupSeparators: true
167
+
168
+ Rails/OutputSafety:
169
+ # YC Compliant
170
+ Enabled: false
171
+ # Prefer safe_join instead of html_save
172
+
173
+ Rails/HttpPositionalArguments:
174
+ # YC Compliant
175
+ Enabled: false
176
+ # prefer get(:new, params: {}) instead of get(:new, {})
177
+
178
+ Rails/SkipsModelValidations:
179
+ # YC Compliant
180
+ Enabled: false
181
+
182
+ Rails/HasAndBelongsToMany:
183
+ # YC Compliant
184
+ Enabled: false
185
+
186
+ # This cop checks that models subclass ApplicationRecord with Rails 5.0.
187
+ Rails/ApplicationRecord:
188
+ Enabled: false
189
+
190
+ # This cop checks that models subclass ApplicationJob with Rails 5.0.
191
+ Rails/ApplicationJob:
192
+ Enabled: false
193
+
194
+ Rails/BelongsTo:
195
+ Enabled: true
196
+
197
+ Rails/IgnoredSkipActionFilterOption:
198
+ Enabled: true
199
+
200
+ Rails/LinkToBlank:
201
+ Enabled: true
202
+
203
+ Style/EmptyMethod:
204
+ # YC Compliant
205
+ Enabled: false
206
+
207
+ Style/IpAddresses:
208
+ Enabled: true
209
+
210
+ Style/ModuleFunction:
211
+ # YC Compliant
212
+ Enabled: false
213
+
214
+ Style/MultilineMethodSignature:
215
+ Enabled: true
216
+
217
+ Style/StringLiterals:
218
+ # YC Compliant
219
+ Enabled: false
220
+
221
+ Style/StringLiteralsInInterpolation:
222
+ # YC Compliant
223
+ Enabled: false
224
+
225
+ Lint/DisjunctiveAssignmentInConstructor:
226
+ Enabled: true
227
+
228
+ Rails/UnknownEnv:
229
+ Environments:
230
+ - development
231
+ - test
232
+ - review
233
+ - staging
234
+ - acceptance
235
+ - training
236
+ - production
237
+
238
+ Rails/LexicallyScopedActionFilter:
239
+ Enabled: false
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'rubocopital/version'
4
+
5
+ module Rubocopital
6
+ # Your code goes here...
7
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Rubocopital
4
+ VERSION = '0.5.1'
5
+ end
@@ -0,0 +1,5 @@
1
+ configuration_version: 1
2
+ name: "rubocopital"
3
+ type: "ruby-library"
4
+ lead_developer: "Martijn Bleeker"
5
+ product_lead: "Ivan Zarea"
@@ -0,0 +1,43 @@
1
+ # frozen_string_literal: true
2
+
3
+ lib = File.expand_path('../lib', __FILE__)
4
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
+ require 'rubocopital/version'
6
+
7
+ Gem::Specification.new do |spec|
8
+ spec.name = 'rubocopital'
9
+ spec.version = Rubocopital::VERSION
10
+ spec.authors = ['Marcel Eeken']
11
+ spec.email = ['m.eeken@youngcapital.nl']
12
+
13
+ spec.summary = 'Shared rubocop configuration'
14
+ spec.description = 'We need to have a common configuration of ruby style,
15
+ this gem hold that.'
16
+ spec.homepage = 'https://github.com/youngcapital/rubocopital'
17
+ spec.license = 'MIT'
18
+
19
+ if spec.respond_to?(:metadata)
20
+ spec.metadata['allowed_push_host'] = "https://rubygems.org"
21
+
22
+ spec.metadata['hompeage_uri'] = spec.homepage
23
+ spec.metadata['source_code_uri'] = spec.homepage
24
+ spec.metadata['changelog_uri'] = 'https://github.com/youngcapital/rubocopital/blob/master/CHANGELOG.md'
25
+ else
26
+ raise 'RubyGems 2.0 or newer is required to protect against ' \
27
+ 'public gem pushes.'
28
+ end
29
+
30
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
31
+ f.match(%r{^(test|spec|features)/})
32
+ end
33
+ spec.bindir = 'exe'
34
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
35
+ spec.require_paths = ['lib']
36
+
37
+ spec.add_runtime_dependency 'rubocop', '~> 0.67.2'
38
+ spec.add_runtime_dependency "rubocop-rspec", "1.32.0"
39
+
40
+ spec.add_development_dependency 'bundler', '~> 1.15'
41
+ spec.add_development_dependency 'rake', '~> 10.0'
42
+ spec.add_development_dependency 'rspec', '~> 3.0'
43
+ end
metadata ADDED
@@ -0,0 +1,137 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rubocopital
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.5.1
5
+ platform: ruby
6
+ authors:
7
+ - Marcel Eeken
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2019-11-08 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rubocop
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 0.67.2
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 0.67.2
27
+ - !ruby/object:Gem::Dependency
28
+ name: rubocop-rspec
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '='
32
+ - !ruby/object:Gem::Version
33
+ version: 1.32.0
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '='
39
+ - !ruby/object:Gem::Version
40
+ version: 1.32.0
41
+ - !ruby/object:Gem::Dependency
42
+ name: bundler
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '1.15'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '1.15'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rake
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '10.0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '10.0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rspec
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '3.0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '3.0'
83
+ description: |-
84
+ We need to have a common configuration of ruby style,
85
+ this gem hold that.
86
+ email:
87
+ - m.eeken@youngcapital.nl
88
+ executables: []
89
+ extensions: []
90
+ extra_rdoc_files: []
91
+ files:
92
+ - ".gitignore"
93
+ - ".gitlab-ci.yml"
94
+ - ".rspec"
95
+ - ".rubocop-rspec.yml"
96
+ - ".rubocop.yml"
97
+ - ".travis.yml"
98
+ - CHANGELOG.md
99
+ - Gemfile
100
+ - LICENSE.txt
101
+ - README.md
102
+ - Rakefile
103
+ - bin/console
104
+ - bin/setup
105
+ - default.yml
106
+ - lib/rubocopital.rb
107
+ - lib/rubocopital/version.rb
108
+ - project.yml
109
+ - rubocopital.gemspec
110
+ homepage: https://github.com/youngcapital/rubocopital
111
+ licenses:
112
+ - MIT
113
+ metadata:
114
+ allowed_push_host: https://rubygems.org
115
+ hompeage_uri: https://github.com/youngcapital/rubocopital
116
+ source_code_uri: https://github.com/youngcapital/rubocopital
117
+ changelog_uri: https://github.com/youngcapital/rubocopital/blob/master/CHANGELOG.md
118
+ post_install_message:
119
+ rdoc_options: []
120
+ require_paths:
121
+ - lib
122
+ required_ruby_version: !ruby/object:Gem::Requirement
123
+ requirements:
124
+ - - ">="
125
+ - !ruby/object:Gem::Version
126
+ version: '0'
127
+ required_rubygems_version: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ requirements: []
133
+ rubygems_version: 3.0.3
134
+ signing_key:
135
+ specification_version: 4
136
+ summary: Shared rubocop configuration
137
+ test_files: []