house_style 2.2.0 → 3.0.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 +20 -1
- data/features/rubocop.yml +7 -0
- data/house_style.gemspec +6 -7
- data/lib/generators/house_style/templates/rspec_rubocop.yml +0 -2
- data/lib/generators/house_style/templates/rubocop.yml +2 -0
- data/performance/rubocop.yml +58 -3
- data/rails/db_migrate.yml +0 -8
- data/rails/rubocop.yml +118 -19
- data/rspec/rubocop.yml +96 -23
- data/ruby/configuration.yml +9 -7
- data/ruby/rubocop.yml +729 -4
- metadata +13 -35
- data/bin/console +0 -14
- data/bin/setup +0 -7
- 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: 4c7d73723e1623f63dc207e459d60607779a0337f292376ea84994364c8ebaad
|
4
|
+
data.tar.gz: bff167b4593dfe8050a119e77b8faec1b1f852718151610dd21aa6e765d2e488
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e0007ffa7833fef6f6c04b51c0e5ae92b4ef986aa5d56a8998553af189d6a438fc5d7d1aba7d32b85f56cee2b807bd36933c48a2c2de0391f29232ca042f7ed3
|
7
|
+
data.tar.gz: 7c72f7a747f8702aa44f71910e41791d26b4573bd89c3eabce9954e7ddd6769e2b6c9d7e724915f31949c78e14eaf667d85aba544b8e0ad563e5a83429470571
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,25 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
-
##
|
3
|
+
## 3.0.0
|
4
|
+
### Bug fixes
|
5
|
+
- 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.
|
6
|
+
### Changes
|
7
|
+
- Disable all cops by default (including the new ones), and specifically set the enabled ones.
|
8
|
+
- Remove rubocop-rake plugin.
|
9
|
+
- Reduce the number of configuration files, `rubocop.yml` will include the cops configuration for each environment/plugin
|
10
|
+
- 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.
|
11
|
+
- Relax plugin versions
|
12
|
+
- Autocorrect disabled for Rspec/Focus
|
13
|
+
- Allow numbers at the end of block parameter names
|
14
|
+
- Be quite relaxed with Layout/LineLength cop, ignore patterns related to strings/descriptions/logs and encourage autocorrection.
|
15
|
+
|
16
|
+
## 2.3.0
|
17
|
+
### Changes
|
18
|
+
- Exclude more Rails configuration files affected by rails app:update.
|
19
|
+
|
20
|
+
## 2.2.1
|
21
|
+
### Bug fixes
|
22
|
+
- Do not skip features/ directory in the gem when packaging.
|
4
23
|
|
5
24
|
## 2.2.0
|
6
25
|
### Bug fixes
|
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.0.0'
|
7
7
|
spec.authors = ['Altmetric', 'Scott Matthewman']
|
8
8
|
spec.email = ['engineering@altmetric.com', 'scott.matthewman@gmail.com']
|
9
9
|
|
@@ -12,14 +12,13 @@ Gem::Specification.new do |spec|
|
|
12
12
|
spec.homepage = 'https://github.com/altmetric/house_style'
|
13
13
|
spec.license = 'MIT'
|
14
14
|
|
15
|
-
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(
|
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,7 @@ 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
5
|
Style/BlockDelimiters:
|
12
6
|
Enabled: false
|
13
|
-
Style/Documentation:
|
14
|
-
Enabled: false
|
15
7
|
Style/StringLiterals:
|
16
8
|
Enabled: false
|
data/rails/rubocop.yml
CHANGED
@@ -1,22 +1,121 @@
|
|
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/FindById:
|
49
|
+
Enabled: true
|
50
|
+
Rails/FindEach:
|
51
|
+
Enabled: true
|
52
|
+
Rails/HttpPositionalArguments:
|
53
|
+
Enabled: true
|
54
|
+
Rails/HttpStatus:
|
55
|
+
Enabled: true
|
56
|
+
Rails/IgnoredSkipActionFilterOption:
|
57
|
+
Enabled: true
|
58
|
+
Rails/IndexBy:
|
59
|
+
Enabled: true
|
60
|
+
Rails/IndexWith:
|
61
|
+
Enabled: true
|
62
|
+
Rails/LexicallyScopedActionFilter:
|
63
|
+
Enabled: true
|
64
|
+
Rails/LinkToBlank:
|
65
|
+
Enabled: true
|
66
|
+
Rails/MatchRoute:
|
67
|
+
Enabled: true
|
68
|
+
Rails/MigrationClassName:
|
69
|
+
Enabled: true
|
70
|
+
Rails/Pick:
|
71
|
+
Enabled: true
|
72
|
+
Rails/Pluck:
|
73
|
+
Enabled: true
|
74
|
+
Rails/PluralizationGrammar:
|
75
|
+
Enabled: true
|
76
|
+
Rails/Presence:
|
77
|
+
Enabled: true
|
78
|
+
Rails/Present:
|
79
|
+
Enabled: true
|
80
|
+
Rails/ReadWriteAttribute:
|
81
|
+
Enabled: true
|
82
|
+
Rails/RedundantAllowNil:
|
83
|
+
Enabled: true
|
84
|
+
Rails/RedundantForeignKey:
|
85
|
+
Enabled: true
|
86
|
+
Rails/RedundantReceiverInWithOptions:
|
87
|
+
Enabled: true
|
88
|
+
Rails/RedundantTravelBack:
|
89
|
+
Enabled: true
|
90
|
+
Rails/RenderInline:
|
91
|
+
Enabled: true
|
92
|
+
Rails/RenderPlainText:
|
93
|
+
Enabled: true
|
94
|
+
Rails/RequestReferer:
|
95
|
+
Enabled: true
|
96
|
+
Rails/RootJoinChain:
|
97
|
+
Enabled: true
|
98
|
+
Rails/RootPublicPath:
|
99
|
+
Enabled: true
|
100
|
+
Rails/SafeNavigation:
|
101
|
+
Enabled: true
|
102
|
+
Rails/ScopeArgs:
|
103
|
+
Enabled: true
|
104
|
+
Rails/StripHeredoc:
|
105
|
+
Enabled: true
|
106
|
+
Rails/TimeZone:
|
107
|
+
Enabled: true
|
108
|
+
Rails/TimeZoneAssignment:
|
109
|
+
Enabled: true
|
110
|
+
Rails/TransactionExitStatement:
|
111
|
+
Enabled: true
|
112
|
+
Rails/UniqBeforePluck:
|
113
|
+
Enabled: true
|
114
|
+
Rails/UnknownEnv:
|
115
|
+
Enabled: true
|
116
|
+
Rails/UnusedIgnoredColumns:
|
117
|
+
Enabled: true
|
118
|
+
Rails/Validation:
|
119
|
+
Enabled: true
|
120
|
+
Rails/WhereNot:
|
121
|
+
Enabled: true
|
data/rspec/rubocop.yml
CHANGED
@@ -9,30 +9,103 @@ 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:
|
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
|
109
|
+
|
30
110
|
Style/BlockDelimiters:
|
31
111
|
Enabled: false
|
32
|
-
Style/Documentation:
|
33
|
-
Enabled: false
|
34
|
-
Style/SymbolProc:
|
35
|
-
Exclude:
|
36
|
-
- spec/factories/**/*.rb
|
37
|
-
Style/WordArray:
|
38
|
-
Enabled: false
|
data/ruby/configuration.yml
CHANGED
@@ -3,17 +3,19 @@ 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
|
7
10
|
|
8
11
|
Exclude:
|
9
12
|
- bin/**/*
|
10
|
-
-
|
13
|
+
- config/**/*
|
14
|
+
- config.ru
|
15
|
+
- db/*schema.rb
|
11
16
|
- Guardfile
|
12
17
|
- lib/tasks/cucumber.rake
|
13
18
|
- node_modules/**/*
|
19
|
+
- Rakefile
|
14
20
|
- tmp/**/*
|
15
|
-
-
|
16
|
-
- config.ru
|
17
|
-
|
18
|
-
Gemspec/RequiredRubyVersion:
|
19
|
-
Enabled: false
|
21
|
+
- vendor/**/*
|