house_style 2.3.0 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 29e5114e9c83f5b90caceb9be694f39637960c5795e9f9246666302be796836d
4
- data.tar.gz: 7633b076ec8d475f44675cbcbbb215d5423e7c5159c9096aa4f8aa916ecc6a07
3
+ metadata.gz: 4c7d73723e1623f63dc207e459d60607779a0337f292376ea84994364c8ebaad
4
+ data.tar.gz: bff167b4593dfe8050a119e77b8faec1b1f852718151610dd21aa6e765d2e488
5
5
  SHA512:
6
- metadata.gz: bef45d1bc0b477eac9da7d8525b2202cc0fb6f80cf14908bdecdcf988a16021e8454f701d645d3c26a34502693b6aa97a89c6357b91fdc33a1280cafdae4f8a6
7
- data.tar.gz: 80177fd9d2e22aec9f3c8f33749d1b9d44113cd72c9ce5233212d8d740a6c0aeff3c2d6679ee0af622a2e3f829c686435d28267022e25a8c7299f676411eea8e
6
+ metadata.gz: e0007ffa7833fef6f6c04b51c0e5ae92b4ef986aa5d56a8998553af189d6a438fc5d7d1aba7d32b85f56cee2b807bd36933c48a2c2de0391f29232ca042f7ed3
7
+ data.tar.gz: 7c72f7a747f8702aa44f71910e41791d26b4573bd89c3eabce9954e7ddd6769e2b6c9d7e724915f31949c78e14eaf667d85aba544b8e0ad563e5a83429470571
data/CHANGELOG.md CHANGED
@@ -1,6 +1,17 @@
1
1
  # CHANGELOG
2
2
 
3
- ## CURRENT
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.
4
15
 
5
16
  ## 2.3.0
6
17
  ### Changes
data/features/rubocop.yml CHANGED
@@ -2,14 +2,6 @@ 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
5
  Style/BlockDelimiters:
10
6
  Exclude:
11
7
  - 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 = '2.3.0'
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
 
@@ -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.0', '< 1.23'
19
- spec.add_dependency 'rubocop-performance', '~> 1.11.3'
20
- spec.add_dependency 'rubocop-rails', '~> 2.12.3'
21
- spec.add_dependency 'rubocop-rake', '< 1.0'
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'
@@ -1,5 +1,3 @@
1
1
  inherit_from: ../.rubocop.yml
2
2
  inherit_gem:
3
3
  house_style: rspec/rubocop.yml
4
-
5
- require: rubocop-rspec
@@ -1,2 +1,4 @@
1
1
  inherit_gem:
2
2
  house_style: rails/rubocop.yml
3
+
4
+ require: rubocop-rspec
@@ -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/InverseOf:
9
- Enabled: false
10
- Rails/HasManyOrHasOneDependent:
11
- Enabled: false
12
- Rails/EnvironmentVariableAccess:
13
- Enabled: true
14
- AllowReads: true
15
- Rails/ShortI18n:
16
- Enabled: false
17
- Rails/SquishedSQLHeredocs:
18
- Enabled: false
19
- Rails/SkipsModelValidations:
20
- Enabled: false
21
-
22
- require: rubocop-rails
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
- Metrics/BlockLength:
13
- Enabled: false
14
- Metrics/ModuleLength:
15
- Enabled: false
16
- RSpec/ContextWording:
17
- Enabled: false
18
- RSpec/ExampleLength:
19
- Enabled: false
20
- RSpec/MultipleExpectations:
21
- Enabled: false
22
- RSpec/MultipleMemoizedHelpers:
23
- Max: 10
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/NestedGroups:
27
- Enabled: false
28
- RSpec/DescribeClass:
29
- Enabled: false
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
@@ -3,20 +3,19 @@ AllCops:
3
3
  DisplayStyleGuide: true
4
4
  ExtraDetails: true
5
5
  UseCache: true
6
- NewCops: enable
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
- - vendor/**/*
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
- - db/*schema.rb
16
- - config.ru
17
- - config/environments/**/*
18
- - config/puma.rb
19
- - config/spring.rb
20
-
21
- Gemspec/RequiredRubyVersion:
22
- Enabled: false
21
+ - vendor/**/*