nxt_cop 2.5.0 → 2.6.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 +10 -0
- data/Gemfile.lock +1 -1
- data/default.yml +57 -53
- data/lib/nxt_cop/version.rb +1 -1
- data/{custom_cops/nxt_core/rails → lib/rubocop/cop/nxt_cop}/use_of_rails_logger.rb +3 -3
- data/lib/rubocop/cop/nxt_cop.rb +3 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7f45584695121519ec6dbc0f1d565c2463dbe829e55e7cf00df78e8f728042ee
|
4
|
+
data.tar.gz: b5a2d9c22beb2f592fc8cb1d50f04abaad093c53b8b69d3bec04a18a931068b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6e14374bcaa444f215a6a4b62d713666ba48553e4cc4d9660c5ecd8a3d6f957184a619a7446caad5840a2d1e9f3603f9a4533c5d2a89db165efa6275718d8cf5
|
7
|
+
data.tar.gz: 9ed42c24ab1cca574a987649c7aafe5f15931297d25fdbb4e05d628df14aa9fc299f1e1466a65eed5decfdf0c5dbb37b153ad623e65b913cf135af6b75e9cfc7
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
+
# v2.6.0 2025-02-26
|
2
|
+
|
3
|
+
## What's Changed
|
4
|
+
|
5
|
+
- Moves customs cops to namespace `Rubocop::Cop::NxtCop` so they can be required directly from the application without it being part of nxt_cop's `default.yml`.
|
6
|
+
|
7
|
+
# v2.5.1 2024-06-12
|
8
|
+
## What's Changed
|
9
|
+
- Adds rubocop-rspec_rails to `.default.yml` to restore previous functionality
|
10
|
+
|
1
11
|
# v2.5.0 2024-06-11
|
2
12
|
## What's Changed
|
3
13
|
- Relaxes the rubocop version to not pin the patch
|
data/Gemfile.lock
CHANGED
data/default.yml
CHANGED
@@ -1,15 +1,16 @@
|
|
1
1
|
require:
|
2
|
-
- rubocop-factory_bot
|
3
|
-
- rubocop-rails
|
4
|
-
- rubocop-rspec
|
5
|
-
-
|
2
|
+
- rubocop-factory_bot
|
3
|
+
- rubocop-rails
|
4
|
+
- rubocop-rspec
|
5
|
+
- rubocop-rspec_rails
|
6
|
+
- rubocop/cop/nxt_cop/use_of_rails_logger.rb
|
6
7
|
|
7
8
|
inherit_mode:
|
8
9
|
merge:
|
9
10
|
- Exclude
|
10
11
|
- Include
|
11
12
|
|
12
|
-
|
13
|
+
NxtCop/UseOfRailsLogger:
|
13
14
|
Description: "Custom Getsafe cop to ensure the correct logger is used"
|
14
15
|
|
15
16
|
AllCops:
|
@@ -26,7 +27,6 @@ AllCops:
|
|
26
27
|
DisabledByDefault: false
|
27
28
|
NewCops: disable # to avoid warnings. TODO: remove this setting and add new cops from the warning.
|
28
29
|
|
29
|
-
|
30
30
|
Layout/ArgumentAlignment:
|
31
31
|
EnforcedStyle: with_fixed_indentation
|
32
32
|
Layout/ArrayAlignment:
|
@@ -64,35 +64,44 @@ Layout/FirstArrayElementLineBreak:
|
|
64
64
|
Layout/MultilineMethodParameterLineBreaks:
|
65
65
|
Enabled: true
|
66
66
|
|
67
|
+
# Lint
|
67
68
|
Lint:
|
68
69
|
Enabled: true
|
69
70
|
Lint/AmbiguousBlockAssociation:
|
70
71
|
Exclude:
|
71
72
|
- spec/**/*
|
73
|
+
Lint/AssignmentInCondition:
|
74
|
+
Enabled: true
|
75
|
+
Lint/DuplicateHashKey:
|
76
|
+
Enabled: true
|
77
|
+
Lint/DuplicateRegexpCharacterClassElement:
|
78
|
+
Enabled: true
|
79
|
+
Lint/EmptyInPattern:
|
80
|
+
Enabled: true
|
81
|
+
Lint/IncompatibleIoSelectWithFiberScheduler:
|
82
|
+
Enabled: true
|
83
|
+
Lint/LambdaWithoutLiteralBlock:
|
84
|
+
Enabled: true
|
72
85
|
Lint/Loop:
|
73
|
-
Enabled:
|
86
|
+
Enabled: true
|
74
87
|
Lint/MissingSuper:
|
75
|
-
Enabled: false
|
76
|
-
Lint/SymbolConversion:
|
77
|
-
EnforcedStyle: consistent
|
78
|
-
Style/TrailingCommaInHashLiteral:
|
79
|
-
Enabled: false
|
80
|
-
Style/HashSyntax:
|
81
88
|
Enabled: true
|
82
|
-
|
83
|
-
Security:
|
84
|
-
EnabledByDefault: true
|
85
|
-
Style/Semicolon:
|
86
|
-
Exclude:
|
87
|
-
- spec/**/*
|
88
|
-
Rails/TimeZone:
|
89
|
+
Lint/NoReturnInBeginEndBlocks:
|
89
90
|
Enabled: true
|
90
|
-
|
91
|
+
Lint/NumberedParameterAssignment:
|
91
92
|
Enabled: true
|
92
|
-
|
93
|
-
Enabled: false
|
94
|
-
RSpec/Focus:
|
93
|
+
Lint/RefinementImportMethods:
|
95
94
|
Enabled: true
|
95
|
+
Lint/RequireRelativeSelfPath:
|
96
|
+
Enabled: true
|
97
|
+
Lint/ToEnumArguments:
|
98
|
+
Enabled: true
|
99
|
+
Lint/UnexpectedBlockArity:
|
100
|
+
Enabled: true
|
101
|
+
Lint/UselessRuby2Keywords:
|
102
|
+
Enabled: true
|
103
|
+
Lint/SymbolConversion:
|
104
|
+
EnforcedStyle: consistent
|
96
105
|
Lint/AmbiguousAssignment:
|
97
106
|
Enabled: true
|
98
107
|
Lint/DeprecatedConstants:
|
@@ -116,39 +125,15 @@ Lint/RedundantDirGlobSort:
|
|
116
125
|
Lint/RequireRangeParentheses:
|
117
126
|
Enabled: true
|
118
127
|
|
119
|
-
# These checks are valid, but better left to programmer's discretion, as the effects of such code are harmless.
|
128
|
+
# Lint - These checks are valid, but better left to programmer's discretion, as the effects of such code are harmless.
|
120
129
|
Lint/DuplicateBranch:
|
121
130
|
Enabled: false
|
122
|
-
Lint/DuplicateRegexpCharacterClassElement:
|
123
|
-
Enabled: false
|
124
131
|
Lint/EmptyBlock:
|
125
132
|
Enabled: false
|
126
133
|
Lint/EmptyClass:
|
127
134
|
Enabled: false
|
128
|
-
Lint/EmptyInPattern:
|
129
|
-
Enabled: false
|
130
|
-
Lint/UnexpectedBlockArity:
|
131
|
-
Enabled: false
|
132
135
|
|
133
|
-
#
|
134
|
-
Lint/IncompatibleIoSelectWithFiberScheduler:
|
135
|
-
Enabled: false
|
136
|
-
Lint/LambdaWithoutLiteralBlock:
|
137
|
-
Enabled: false
|
138
|
-
Lint/NoReturnInBeginEndBlocks: # ❌ ENABLE THIS!
|
139
|
-
Enabled: false
|
140
|
-
Lint/NumberedParameterAssignment:
|
141
|
-
Enabled: false
|
142
|
-
Lint/RefinementImportMethods:
|
143
|
-
Enabled: false
|
144
|
-
Lint/RequireRelativeSelfPath:
|
145
|
-
Enabled: false
|
146
|
-
Lint/ToEnumArguments:
|
147
|
-
Enabled: false
|
148
|
-
Lint/UselessRuby2Keywords:
|
149
|
-
Enabled: false
|
150
|
-
|
151
|
-
# Since we don't have all cops enabled by default we have to add every new cop explicitly
|
136
|
+
# Lint - Since we don't have all cops enabled by default we have to add every new cop explicitly
|
152
137
|
Lint/DuplicateMagicComment:
|
153
138
|
Enabled: true
|
154
139
|
Lint/UselessRescue:
|
@@ -160,6 +145,25 @@ Lint/MixedCaseRange:
|
|
160
145
|
Lint/RedundantRegexpQuantifiers:
|
161
146
|
Enabled: true
|
162
147
|
|
148
|
+
Style/TrailingCommaInHashLiteral:
|
149
|
+
Enabled: false
|
150
|
+
Style/HashSyntax:
|
151
|
+
Enabled: true
|
152
|
+
EnforcedShorthandSyntax: either
|
153
|
+
Security:
|
154
|
+
EnabledByDefault: true
|
155
|
+
Style/Semicolon:
|
156
|
+
Exclude:
|
157
|
+
- spec/**/*
|
158
|
+
Rails/TimeZone:
|
159
|
+
Enabled: true
|
160
|
+
Rails/Date:
|
161
|
+
Enabled: true
|
162
|
+
RSpec:
|
163
|
+
Enabled: false
|
164
|
+
RSpec/Focus:
|
165
|
+
Enabled: true
|
166
|
+
|
163
167
|
# This is default cops we want to keep disabled:
|
164
168
|
Style/FrozenStringLiteralComment:
|
165
169
|
Enabled: false
|
@@ -307,7 +311,7 @@ Rails/IndexBy:
|
|
307
311
|
Enabled: false
|
308
312
|
Rails/Pick:
|
309
313
|
Enabled: false
|
310
|
-
Style/CombinableLoops:
|
314
|
+
Style/CombinableLoops: # hard to autocorrect properly
|
311
315
|
Enabled: false
|
312
316
|
FactoryBot/CreateList:
|
313
317
|
Enabled: false
|
@@ -319,7 +323,7 @@ Style/GuardClause:
|
|
319
323
|
Enabled: false
|
320
324
|
Style/PercentLiteralDelimiters:
|
321
325
|
Enabled: false
|
322
|
-
Style/StringConcatenation:
|
326
|
+
Style/StringConcatenation: # heavily used in insurance service
|
323
327
|
Enabled: false
|
324
328
|
Style/InverseMethods:
|
325
329
|
Enabled: false
|
@@ -392,7 +396,7 @@ Rails/UniqueValidationWithoutIndex: # definitely enable!!!
|
|
392
396
|
Enabled: false
|
393
397
|
Rails/Validation: # discuss with the team
|
394
398
|
Enabled: false
|
395
|
-
Rails/LexicallyScopedActionFilter:
|
399
|
+
Rails/LexicallyScopedActionFilter: # enable and manually disable offences
|
396
400
|
Enabled: false
|
397
401
|
Security/Open:
|
398
402
|
Enabled: false
|
data/lib/nxt_cop/version.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
module
|
4
|
-
module
|
5
|
-
module
|
3
|
+
module Rubocop
|
4
|
+
module Cop
|
5
|
+
module NxtCop
|
6
6
|
# Ensures that the NxtCore logger is used instead of `Rails.logger`.
|
7
7
|
class UseOfRailsLogger < RuboCop::Cop::Base
|
8
8
|
extend RuboCop::Cop::AutoCorrector
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nxt_cop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Scott Livingstone
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-02-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubocop
|
@@ -172,9 +172,10 @@ files:
|
|
172
172
|
- bin/guard
|
173
173
|
- bin/rspec
|
174
174
|
- bin/setup
|
175
|
-
- custom_cops/nxt_core/rails/use_of_rails_logger.rb
|
176
175
|
- default.yml
|
177
176
|
- lib/nxt_cop/version.rb
|
177
|
+
- lib/rubocop/cop/nxt_cop.rb
|
178
|
+
- lib/rubocop/cop/nxt_cop/use_of_rails_logger.rb
|
178
179
|
- nxt_cop.gemspec
|
179
180
|
homepage: https://github.com/nxt-insurance/nxt_cop
|
180
181
|
licenses:
|