rubocop-skiftle 0.1.0 → 0.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: be504861496c6237e37745064fbe01ad6bbac728a9fe4b2c5231dd51684b41c6
4
- data.tar.gz: 0ef2c7916980b728c3044d6d2fbcd82a0f82069b66606d63ff77ade96c71621e
3
+ metadata.gz: e8ef5feb3889f1165ef053606e2eb80a76d6bac25ad0aaff1c98107704b44bc0
4
+ data.tar.gz: 8b09d6c48d5274407fa3f8e4bf4c68438b285828057b4001fd1cc96e48caa90b
5
5
  SHA512:
6
- metadata.gz: dd23db581c75aacc90bc59943af0069ec9c42ac96a33ccb56050e6ab7cf2d1c1e110b5e13745921e3afbd0201fe15e1dfc0d60e27fbd255a49651e945b609282
7
- data.tar.gz: ceb29282b594482d9aaba36c7f13cdc4f6bb867280c99dc4765c4a2c0a969479c3d71a6496205efd8d99fa555b810567ce870bd85349bbf31fbdf0e3e6fd1c18
6
+ metadata.gz: f0649c529e7707dfe6376a44c55302278c75f0482fc664d6391ddf967fcfb28a68100f40fb3b6b131d847dcb507dc30544097a4281bcd1804a3060124c49795e
7
+ data.tar.gz: 8f5911c74d3b929adf1733a043064d60abe0d21d4d2d7ab8ae91f685016805acb7cbd3f21c85b7706c419f2e3870ff35b32324c6ee4afc539748255d5d2b964f
data/README.md CHANGED
@@ -8,8 +8,9 @@ Skiftle's shared RuboCop configuration. Includes [rubocop-canon](https://github.
8
8
  |--------|---------|----------|
9
9
  | `rubocop-gem.yml` | Ruby gems | Canon cops, Layout, Style, Metrics, Naming, Lint, RSpec |
10
10
  | `rubocop-app.yml` | Rails apps | Everything in gem + Rails overrides + standard excludes |
11
+ | `rubocop-apiwork.yml` | Apps using apiwork | apiwork DSL names for the Canon cops |
11
12
 
12
- Both presets inherit from `rubocop-base.yml` which contains all shared rules.
13
+ Both presets inherit from `rubocop-base.yml` which contains all shared rules. `rubocop-apiwork.yml` is combined with a preset.
13
14
 
14
15
  ## Installation
15
16
 
@@ -35,6 +36,16 @@ inherit_gem:
35
36
  rubocop-skiftle: rubocop-app.yml
36
37
  ```
37
38
 
39
+ For a Rails app using apiwork:
40
+
41
+ ```yaml
42
+ # .rubocop.yml
43
+ inherit_gem:
44
+ rubocop-skiftle:
45
+ - rubocop-app.yml
46
+ - rubocop-apiwork.yml
47
+ ```
48
+
38
49
  ## License
39
50
 
40
51
  MIT
@@ -2,6 +2,6 @@
2
2
 
3
3
  module RuboCop
4
4
  module Skiftle
5
- VERSION = '0.1.0'
5
+ VERSION = '0.2.0'
6
6
  end
7
7
  end
@@ -0,0 +1,14 @@
1
+ Canon/DeclarationGroups:
2
+ inherit_mode:
3
+ merge:
4
+ - GroupedMethods
5
+ GroupedMethods:
6
+ - [array, boolean, number, object, reference, string, union]
7
+
8
+ Canon/MethodBodyBlankLines:
9
+ inherit_mode:
10
+ merge:
11
+ - SeparatedMethods
12
+ SeparatedMethods:
13
+ - expose
14
+ - expose_error
data/rubocop-app.yml CHANGED
@@ -11,6 +11,26 @@ AllCops:
11
11
  - "**/tmp/**/*"
12
12
  - "**/vendor/**/*"
13
13
 
14
+ Canon/DeclarationGroups:
15
+ inherit_mode:
16
+ merge:
17
+ - GroupedMethods
18
+ GroupedMethods:
19
+ - [belongs_to, has_and_belongs_to_many, has_many, has_one]
20
+ - [validate, validates]
21
+ - [after_commit, after_create, after_create_commit, after_destroy, after_save,
22
+ after_update, after_update_commit, before_create, before_save, before_validation]
23
+
24
+ Canon/MethodBodyBlankLines:
25
+ inherit_mode:
26
+ merge:
27
+ - SeparatedMethods
28
+ SeparatedMethods:
29
+ - head
30
+ - mail
31
+ - redirect_to
32
+ - render
33
+
14
34
  Rails/Delegate:
15
35
  Enabled: false
16
36
 
data/rubocop-base.yml CHANGED
@@ -9,9 +9,29 @@ AllCops:
9
9
  SuggestExtensions: false
10
10
 
11
11
  # Canon cops — Skiftle defaults
12
+ Canon/BlockPhases:
13
+ Enabled: true
14
+ Blocks:
15
+ - it
16
+ - specify
17
+ TrailingMethods:
18
+ - expect
19
+ - expect_any_instance_of
20
+ - is_expected
21
+
22
+ Canon/DeclarationGroups:
23
+ Enabled: true
24
+ GroupedMethods:
25
+ - [attr_accessor, attr_reader, attr_writer]
26
+
12
27
  Canon/KeywordShorthand:
13
28
  Enabled: true
14
29
 
30
+ Canon/MethodBodyBlankLines:
31
+ Enabled: true
32
+ SeparatedMethods:
33
+ - errors.add
34
+
15
35
  Canon/SortHash:
16
36
  Enabled: true
17
37
  ShorthandsFirst: true
@@ -44,6 +64,9 @@ Canon/SortMethodDefinition:
44
64
  Enabled: true
45
65
 
46
66
  # Layout
67
+ Layout/EmptyLinesAfterModuleInclusion:
68
+ Enabled: true
69
+
47
70
  Layout/LineLength:
48
71
  Max: 150
49
72
  AllowedPatterns:
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-skiftle
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - skiftle
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-02-24 00:00:00.000000000 Z
11
+ date: 2026-09-06 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: lefthook
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '2.1'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '2.1'
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: rubocop
15
29
  requirement: !ruby/object:Gem::Requirement
@@ -36,14 +50,14 @@ dependencies:
36
50
  requirements:
37
51
  - - "~>"
38
52
  - !ruby/object:Gem::Version
39
- version: '0.1'
53
+ version: '0.2'
40
54
  type: :runtime
41
55
  prerelease: false
42
56
  version_requirements: !ruby/object:Gem::Requirement
43
57
  requirements:
44
58
  - - "~>"
45
59
  - !ruby/object:Gem::Version
46
- version: '0.1'
60
+ version: '0.2'
47
61
  - !ruby/object:Gem::Dependency
48
62
  name: rubocop-performance
49
63
  requirement: !ruby/object:Gem::Requirement
@@ -133,6 +147,7 @@ files:
133
147
  - LICENSE.txt
134
148
  - README.md
135
149
  - lib/rubocop/skiftle/version.rb
150
+ - rubocop-apiwork.yml
136
151
  - rubocop-app.yml
137
152
  - rubocop-base.yml
138
153
  - rubocop-gem.yml
@@ -158,7 +173,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
158
173
  - !ruby/object:Gem::Version
159
174
  version: '0'
160
175
  requirements: []
161
- rubygems_version: 3.4.1
176
+ rubygems_version: 3.4.19
162
177
  signing_key:
163
178
  specification_version: 4
164
179
  summary: Skiftle's shared RuboCop configuration