house_style 2.2.1 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +24 -1
- data/features/rubocop.yml +0 -11
- data/house_style.gemspec +5 -6
- data/lib/generators/house_style/templates/rspec_rubocop.yml +0 -3
- data/lib/generators/house_style/templates/rubocop.yml +2 -0
- data/performance/rubocop.yml +58 -3
- data/rails/db_migrate.yml +0 -10
- data/rails/rubocop.yml +116 -19
- data/rspec/rubocop.yml +95 -25
- data/ruby/configuration.yml +10 -7
- data/ruby/rubocop.yml +715 -4
- metadata +12 -33
- data/performance/default_rules.yml +0 -32
- data/rails/default_rules.yml +0 -34
- data/rails/style.yml +0 -29
- data/rake/rubocop.yml +0 -1
- data/ruby/default_rules.yml +0 -60
- data/ruby/metrics.yml +0 -2
- data/ruby/style.yml +0 -66
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0c947968f6d0fc33d002800803ef43964505d6612eb4ae0b5b77b22f69930c8e
|
4
|
+
data.tar.gz: 0f2ffa40cba2c8c601918a1293860df3b4057193a91660c7bf53adffd15f1b02
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e630442c72620678ede86e122641eb7bf77a7d68d5bac6af010b3715b37570414350efb177c22603b9e8ceff70f2de05d2d9019b5bd88820f069509dfdc3e7c8
|
7
|
+
data.tar.gz: d3929cb712e7fcdf91937c0281bfbd3dc1eb54ce0730983a01c48ee96b1797a31102b628a5d0dc9e96b903ea8383dcba8b70041ded132f04a0d476eeccffe109
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,29 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
-
##
|
3
|
+
## 3.1.0
|
4
|
+
### Changes
|
5
|
+
- Do not suggest extensions
|
6
|
+
- Remove Rails/FindById (it isn't safe if you're using MongoId in a project depending on your configuration)
|
7
|
+
- Use `braces_for_chaining` for `Style/BlockDelimiters`. As a team, we've agreed to use this more general extended approach among the community. It also simplifies configuration for specs, fixtures, migrations... etc.
|
8
|
+
## Bug fixes
|
9
|
+
- In RSpec template, do not inherit the root configuration, as the rspec .rubocop.yml file already inherits the ruby configuration itself.
|
10
|
+
|
11
|
+
## 3.0.0
|
12
|
+
### Bug fixes
|
13
|
+
- Change the Rails template so the require for the rspec plugin is done in the main .rubocop.yml file. Otherwise generating the TODO doesn't work properly.
|
14
|
+
### Changes
|
15
|
+
- Disable all cops by default (including the new ones), and specifically set the enabled ones.
|
16
|
+
- Remove rubocop-rake plugin.
|
17
|
+
- Reduce the number of configuration files, `rubocop.yml` will include the cops configuration for each environment/plugin
|
18
|
+
- Set mininum Rubocop version to 1.31 (which includes rubocop server). Relax rubocop version restriction, as it should remain compatible on 1.x branch now that we allow specific cops only.
|
19
|
+
- Relax plugin versions
|
20
|
+
- Autocorrect disabled for Rspec/Focus
|
21
|
+
- Allow numbers at the end of block parameter names
|
22
|
+
- Be quite relaxed with Layout/LineLength cop, ignore patterns related to strings/descriptions/logs and encourage autocorrection.
|
23
|
+
|
24
|
+
## 2.3.0
|
25
|
+
### Changes
|
26
|
+
- Exclude more Rails configuration files affected by rails app:update.
|
4
27
|
|
5
28
|
## 2.2.1
|
6
29
|
### Bug fixes
|
data/features/rubocop.yml
CHANGED
@@ -2,14 +2,3 @@ inherit_from: ../ruby/rubocop.yml
|
|
2
2
|
|
3
3
|
Layout/LineLength:
|
4
4
|
Enabled: false
|
5
|
-
Metrics/BlockLength:
|
6
|
-
Enabled: false
|
7
|
-
Metrics/ModuleLength:
|
8
|
-
Enabled: false
|
9
|
-
Style/BlockDelimiters:
|
10
|
-
Exclude:
|
11
|
-
- factories/**/*
|
12
|
-
Style/Documentation:
|
13
|
-
Enabled: false
|
14
|
-
Style/WordArray:
|
15
|
-
Enabled: false
|
data/house_style.gemspec
CHANGED
@@ -3,7 +3,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |spec|
|
5
5
|
spec.name = 'house_style'
|
6
|
-
spec.version = '
|
6
|
+
spec.version = '3.1.0'
|
7
7
|
spec.authors = ['Altmetric', 'Scott Matthewman']
|
8
8
|
spec.email = ['engineering@altmetric.com', 'scott.matthewman@gmail.com']
|
9
9
|
|
@@ -15,11 +15,10 @@ Gem::Specification.new do |spec|
|
|
15
15
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(bin|.gitignore|)/}) }
|
16
16
|
spec.require_paths = ['lib']
|
17
17
|
|
18
|
-
spec.add_dependency 'rubocop', '>= 1.
|
19
|
-
spec.add_dependency 'rubocop-performance', '~> 1.11
|
20
|
-
spec.add_dependency 'rubocop-rails', '~> 2.12
|
21
|
-
spec.add_dependency 'rubocop-
|
22
|
-
spec.add_dependency 'rubocop-rspec', '~> 2.5.0'
|
18
|
+
spec.add_dependency 'rubocop', '>= 1.31', '< 2.0'
|
19
|
+
spec.add_dependency 'rubocop-performance', '~> 1.11'
|
20
|
+
spec.add_dependency 'rubocop-rails', '~> 2.12'
|
21
|
+
spec.add_dependency 'rubocop-rspec', '~> 2.5'
|
23
22
|
|
24
23
|
spec.add_development_dependency 'bundler', '~> 2.0'
|
25
24
|
spec.add_development_dependency 'rake', '~> 13.0'
|
data/performance/rubocop.yml
CHANGED
@@ -1,4 +1,59 @@
|
|
1
|
-
inherit_from:
|
2
|
-
- ./default_rules.yml
|
3
|
-
|
4
1
|
require: rubocop-performance
|
2
|
+
|
3
|
+
Performance:
|
4
|
+
Exclude:
|
5
|
+
- 'spec/**/*'
|
6
|
+
- 'features/**/*'
|
7
|
+
|
8
|
+
Performance/BigDecimalWithNumericArgument:
|
9
|
+
Enabled: true
|
10
|
+
Performance/BindCall:
|
11
|
+
Enabled: true
|
12
|
+
Performance/BlockGivenWithExplicitBlock:
|
13
|
+
Enabled: true
|
14
|
+
Performance/Caller:
|
15
|
+
Enabled: true
|
16
|
+
Performance/CompareWithBlock:
|
17
|
+
Enabled: true
|
18
|
+
Performance/ConcurrentMonotonicTime:
|
19
|
+
Enabled: true
|
20
|
+
Performance/ConstantRegexp:
|
21
|
+
Enabled: true
|
22
|
+
Performance/DoubleStartEndWith:
|
23
|
+
Enabled: true
|
24
|
+
Performance/FlatMap:
|
25
|
+
Enabled: true
|
26
|
+
Performance/IoReadlines:
|
27
|
+
Enabled: true
|
28
|
+
Performance/MapCompact:
|
29
|
+
Enabled: true
|
30
|
+
Performance/RedundantBlockCall:
|
31
|
+
Enabled: true
|
32
|
+
Performance/RedundantMatch:
|
33
|
+
Enabled: true
|
34
|
+
Performance/RedundantSortBlock:
|
35
|
+
Enabled: true
|
36
|
+
Performance/RedundantSplitRegexpArgument:
|
37
|
+
Enabled: true
|
38
|
+
Performance/RedundantStringChars:
|
39
|
+
Enabled: true
|
40
|
+
Performance/RegexpMatch:
|
41
|
+
Enabled: true
|
42
|
+
Performance/ReverseEach:
|
43
|
+
Enabled: true
|
44
|
+
Performance/ReverseFirst:
|
45
|
+
Enabled: true
|
46
|
+
Performance/SelectMap:
|
47
|
+
Enabled: true
|
48
|
+
Performance/Size:
|
49
|
+
Enabled: true
|
50
|
+
Performance/SortReverse:
|
51
|
+
Enabled: true
|
52
|
+
Performance/Squeeze:
|
53
|
+
Enabled: true
|
54
|
+
Performance/StringIdentifierArgument:
|
55
|
+
Enabled: true
|
56
|
+
Performance/StringReplacement:
|
57
|
+
Enabled: true
|
58
|
+
Performance/UriDefaultParser:
|
59
|
+
Enabled: true
|
data/rails/db_migrate.yml
CHANGED
@@ -2,15 +2,5 @@ Layout/EmptyLineBetweenDefs:
|
|
2
2
|
Enabled: false
|
3
3
|
Layout/LineLength:
|
4
4
|
Enabled: false
|
5
|
-
Metrics/AbcSize:
|
6
|
-
Enabled: false
|
7
|
-
Metrics/ClassLength:
|
8
|
-
Enabled: false
|
9
|
-
Metrics/MethodLength:
|
10
|
-
Enabled: false
|
11
|
-
Style/BlockDelimiters:
|
12
|
-
Enabled: false
|
13
|
-
Style/Documentation:
|
14
|
-
Enabled: false
|
15
5
|
Style/StringLiterals:
|
16
6
|
Enabled: false
|
data/rails/rubocop.yml
CHANGED
@@ -1,22 +1,119 @@
|
|
1
|
+
require: rubocop-rails
|
2
|
+
|
1
3
|
inherit_from:
|
2
4
|
- ../ruby/rubocop.yml
|
3
|
-
- ./default_rules.yml
|
4
|
-
- ./style.yml
|
5
5
|
|
6
|
-
Rails:
|
7
|
-
Enabled: true
|
8
|
-
Rails/
|
9
|
-
Enabled:
|
10
|
-
Rails/
|
11
|
-
Enabled:
|
12
|
-
Rails/
|
13
|
-
Enabled: true
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
6
|
+
Rails/ActiveRecordAliases:
|
7
|
+
Enabled: true
|
8
|
+
Rails/ActiveRecordCallbacksOrder:
|
9
|
+
Enabled: true
|
10
|
+
Rails/ActiveSupportAliases:
|
11
|
+
Enabled: true
|
12
|
+
Rails/AddColumnIndex:
|
13
|
+
Enabled: true
|
14
|
+
Rails/AfterCommitOverride:
|
15
|
+
Enabled: true
|
16
|
+
Rails/ArelStar:
|
17
|
+
Enabled: true
|
18
|
+
Rails/AttributeDefaultBlockValue:
|
19
|
+
Enabled: true
|
20
|
+
Rails/BelongsTo:
|
21
|
+
Enabled: true
|
22
|
+
Rails/ContentTag:
|
23
|
+
Enabled: true
|
24
|
+
Rails/Date:
|
25
|
+
Enabled: true
|
26
|
+
Rails/Delegate:
|
27
|
+
Enabled: true
|
28
|
+
Rails/DelegateAllowBlank:
|
29
|
+
Enabled: true
|
30
|
+
Rails/DotSeparatedKeys:
|
31
|
+
Enabled: true
|
32
|
+
Rails/DuplicateAssociation:
|
33
|
+
Enabled: true
|
34
|
+
Rails/DurationArithmetic:
|
35
|
+
Enabled: true
|
36
|
+
Rails/EagerEvaluationLogMessage:
|
37
|
+
Enabled: true
|
38
|
+
Rails/EnumHash:
|
39
|
+
Enabled: true
|
40
|
+
Rails/EnumUniqueness:
|
41
|
+
Enabled: true
|
42
|
+
Rails/EnvironmentComparison:
|
43
|
+
Enabled: true
|
44
|
+
Rails/ExpandedDateRange:
|
45
|
+
Enabled: true
|
46
|
+
Rails/FindBy:
|
47
|
+
Enabled: true
|
48
|
+
Rails/FindEach:
|
49
|
+
Enabled: true
|
50
|
+
Rails/HttpPositionalArguments:
|
51
|
+
Enabled: true
|
52
|
+
Rails/HttpStatus:
|
53
|
+
Enabled: true
|
54
|
+
Rails/IgnoredSkipActionFilterOption:
|
55
|
+
Enabled: true
|
56
|
+
Rails/IndexBy:
|
57
|
+
Enabled: true
|
58
|
+
Rails/IndexWith:
|
59
|
+
Enabled: true
|
60
|
+
Rails/LexicallyScopedActionFilter:
|
61
|
+
Enabled: true
|
62
|
+
Rails/LinkToBlank:
|
63
|
+
Enabled: true
|
64
|
+
Rails/MatchRoute:
|
65
|
+
Enabled: true
|
66
|
+
Rails/MigrationClassName:
|
67
|
+
Enabled: true
|
68
|
+
Rails/Pick:
|
69
|
+
Enabled: true
|
70
|
+
Rails/Pluck:
|
71
|
+
Enabled: true
|
72
|
+
Rails/PluralizationGrammar:
|
73
|
+
Enabled: true
|
74
|
+
Rails/Presence:
|
75
|
+
Enabled: true
|
76
|
+
Rails/Present:
|
77
|
+
Enabled: true
|
78
|
+
Rails/ReadWriteAttribute:
|
79
|
+
Enabled: true
|
80
|
+
Rails/RedundantAllowNil:
|
81
|
+
Enabled: true
|
82
|
+
Rails/RedundantForeignKey:
|
83
|
+
Enabled: true
|
84
|
+
Rails/RedundantReceiverInWithOptions:
|
85
|
+
Enabled: true
|
86
|
+
Rails/RedundantTravelBack:
|
87
|
+
Enabled: true
|
88
|
+
Rails/RenderInline:
|
89
|
+
Enabled: true
|
90
|
+
Rails/RenderPlainText:
|
91
|
+
Enabled: true
|
92
|
+
Rails/RequestReferer:
|
93
|
+
Enabled: true
|
94
|
+
Rails/RootJoinChain:
|
95
|
+
Enabled: true
|
96
|
+
Rails/RootPublicPath:
|
97
|
+
Enabled: true
|
98
|
+
Rails/SafeNavigation:
|
99
|
+
Enabled: true
|
100
|
+
Rails/ScopeArgs:
|
101
|
+
Enabled: true
|
102
|
+
Rails/StripHeredoc:
|
103
|
+
Enabled: true
|
104
|
+
Rails/TimeZone:
|
105
|
+
Enabled: true
|
106
|
+
Rails/TimeZoneAssignment:
|
107
|
+
Enabled: true
|
108
|
+
Rails/TransactionExitStatement:
|
109
|
+
Enabled: true
|
110
|
+
Rails/UniqBeforePluck:
|
111
|
+
Enabled: true
|
112
|
+
Rails/UnknownEnv:
|
113
|
+
Enabled: true
|
114
|
+
Rails/UnusedIgnoredColumns:
|
115
|
+
Enabled: true
|
116
|
+
Rails/Validation:
|
117
|
+
Enabled: true
|
118
|
+
Rails/WhereNot:
|
119
|
+
Enabled: true
|
data/rspec/rubocop.yml
CHANGED
@@ -9,30 +9,100 @@ Layout/SpaceInsideHashLiteralBraces:
|
|
9
9
|
Lint/AmbiguousBlockAssociation:
|
10
10
|
Exclude:
|
11
11
|
- spec/**/*
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
RSpec/
|
17
|
-
Enabled:
|
18
|
-
RSpec/
|
19
|
-
Enabled:
|
20
|
-
RSpec/
|
21
|
-
Enabled:
|
22
|
-
|
23
|
-
|
12
|
+
|
13
|
+
RSpec/Capybara/CurrentPathExpectation:
|
14
|
+
Enabled: true
|
15
|
+
|
16
|
+
RSpec/FactoryBot/AttributeDefinedStatically:
|
17
|
+
Enabled: true
|
18
|
+
RSpec/FactoryBot/CreateList:
|
19
|
+
Enabled: true
|
20
|
+
RSpec/FactoryBot/FactoryClassName:
|
21
|
+
Enabled: true
|
22
|
+
|
23
|
+
RSpec/BeEql:
|
24
|
+
Enabled: true
|
25
|
+
RSpec/ContextMethod:
|
26
|
+
Enabled: true
|
27
|
+
RSpec/EmptyHook:
|
28
|
+
Enabled: true
|
29
|
+
RSpec/EmptyLineAfterExample:
|
30
|
+
Enabled: true
|
31
|
+
RSpec/EmptyLineAfterExampleGroup:
|
32
|
+
Enabled: true
|
33
|
+
RSpec/EmptyLineAfterFinalLet:
|
34
|
+
Enabled: true
|
35
|
+
RSpec/EmptyLineAfterHook:
|
36
|
+
Enabled: true
|
37
|
+
RSpec/EmptyLineAfterSubject:
|
38
|
+
Enabled: true
|
39
|
+
RSpec/ExpectActual:
|
40
|
+
Enabled: true
|
41
|
+
RSpec/ExpectInHook:
|
42
|
+
Enabled: true
|
43
|
+
RSpec/ExpectOutput:
|
44
|
+
Enabled: true
|
45
|
+
RSpec/FilePath:
|
46
|
+
Enabled: true
|
47
|
+
RSpec/Focus:
|
48
|
+
Enabled: true
|
49
|
+
AutoCorrect: false
|
50
|
+
RSpec/HookArgument:
|
51
|
+
Enabled: true
|
52
|
+
RSpec/HooksBeforeExamples:
|
53
|
+
Enabled: true
|
54
|
+
RSpec/IdenticalEqualityAssertion:
|
55
|
+
Enabled: true
|
56
|
+
RSpec/ImplicitExpect:
|
57
|
+
Enabled: true
|
58
|
+
RSpec/ImplicitSubject:
|
59
|
+
Enabled: true
|
60
|
+
RSpec/InstanceSpy:
|
61
|
+
Enabled: true
|
62
|
+
RSpec/InstanceVariable:
|
63
|
+
Enabled: true
|
64
|
+
RSpec/ItBehavesLike:
|
65
|
+
Enabled: true
|
66
|
+
RSpec/LeadingSubject:
|
67
|
+
Enabled: true
|
68
|
+
RSpec/MultipleSubjects:
|
69
|
+
Enabled: true
|
24
70
|
RSpec/NotToNot:
|
71
|
+
Enabled: true
|
25
72
|
EnforcedStyle: to_not
|
26
|
-
RSpec/
|
27
|
-
Enabled:
|
28
|
-
RSpec/
|
29
|
-
Enabled:
|
30
|
-
|
31
|
-
Enabled:
|
32
|
-
|
33
|
-
Enabled:
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
73
|
+
RSpec/OverwritingSetup:
|
74
|
+
Enabled: true
|
75
|
+
RSpec/ReceiveCounts:
|
76
|
+
Enabled: true
|
77
|
+
RSpec/ReceiveNever:
|
78
|
+
Enabled: true
|
79
|
+
RSpec/RepeatedDescription:
|
80
|
+
Enabled: true
|
81
|
+
RSpec/RepeatedExample:
|
82
|
+
Enabled: true
|
83
|
+
RSpec/RepeatedExampleGroupBody:
|
84
|
+
Enabled: true
|
85
|
+
RSpec/RepeatedExampleGroupDescription:
|
86
|
+
Enabled: true
|
87
|
+
RSpec/RepeatedIncludeExample:
|
88
|
+
Enabled: true
|
89
|
+
RSpec/ReturnFromStub:
|
90
|
+
Enabled: true
|
91
|
+
RSpec/ScatteredLet:
|
92
|
+
Enabled: true
|
93
|
+
RSpec/SharedContext:
|
94
|
+
Enabled: true
|
95
|
+
RSpec/SharedExamples:
|
96
|
+
Enabled: true
|
97
|
+
RSpec/SingleArgumentMessageChain:
|
98
|
+
Enabled: true
|
99
|
+
RSpec/UnspecifiedException:
|
100
|
+
Enabled: true
|
101
|
+
RSpec/VariableDefinition:
|
102
|
+
Enabled: true
|
103
|
+
RSpec/VariableName:
|
104
|
+
Enabled: true
|
105
|
+
RSpec/VoidExpect:
|
106
|
+
Enabled: true
|
107
|
+
RSpec/Yield:
|
108
|
+
Enabled: true
|
data/ruby/configuration.yml
CHANGED
@@ -3,17 +3,20 @@ AllCops:
|
|
3
3
|
DisplayStyleGuide: true
|
4
4
|
ExtraDetails: true
|
5
5
|
UseCache: true
|
6
|
-
NewCops:
|
6
|
+
NewCops: disable
|
7
|
+
# RuboCop has a bunch of cops enabled by default. This setting tells RuboCop
|
8
|
+
# to ignore them, so only the ones explicitly set in this file are enabled.
|
9
|
+
DisabledByDefault: true
|
10
|
+
SuggestExtensions: false
|
7
11
|
|
8
12
|
Exclude:
|
9
13
|
- bin/**/*
|
10
|
-
-
|
14
|
+
- config/**/*
|
15
|
+
- config.ru
|
16
|
+
- db/*schema.rb
|
11
17
|
- Guardfile
|
12
18
|
- lib/tasks/cucumber.rake
|
13
19
|
- node_modules/**/*
|
20
|
+
- Rakefile
|
14
21
|
- tmp/**/*
|
15
|
-
-
|
16
|
-
- config.ru
|
17
|
-
|
18
|
-
Gemspec/RequiredRubyVersion:
|
19
|
-
Enabled: false
|
22
|
+
- vendor/**/*
|