rubocop-intum 0.1.2 → 0.1.3
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/.rubocop.yml +106 -9
- data/README.md +16 -24
- data/lib/rubocop/intum/version.rb +1 -1
- data/rubocop.yml +16 -8
- metadata +12 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 511c72add800ba234c419cb6ade09e23ac8dda088e9fc962b997d65b8fb8fa65
|
4
|
+
data.tar.gz: 1dda81c52a734917a945e9b02679a8a7f1bfa4e408634a911fb2391f354686c3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6e77f2aef1ed9bdec284a3513d0083e127f06d0378cf143bce9ea9445bc93989961c11644483788b203061f4a9f332b544114fa63d0deb1fc61ca1c683f5ae65
|
7
|
+
data.tar.gz: 5bd58d8c8d224c331c63ab97276fd61e9a5c71f1db876bd756fcbb8e868f5dee1e68e3345abf20d81b565e73eb760c73ec952b0bc63edae6f6ee25aa5d532ad0
|
data/.rubocop.yml
CHANGED
@@ -1,16 +1,113 @@
|
|
1
|
-
|
2
|
-
- rubocop.yml
|
1
|
+
inherit_gem:
|
2
|
+
rubocop-intum: rubocop.yml
|
3
3
|
|
4
4
|
AllCops:
|
5
|
-
|
5
|
+
SuggestExtensions: false
|
6
|
+
NewCops: enable
|
7
|
+
Exclude:
|
8
|
+
- 'node_modules/**/*'
|
9
|
+
- 'extensions/**/*'
|
10
|
+
- 'tmp/**/*'
|
11
|
+
- 'vendor/**/*'
|
12
|
+
- '.git/**/*'
|
13
|
+
# Nasz custom
|
14
|
+
- 'db/schema.rb'
|
15
|
+
- 'bin/**/*'
|
16
|
+
- 'Guardfile'
|
17
|
+
- 'app/src/connect/flow/program/*'
|
6
18
|
|
7
|
-
|
19
|
+
Layout/LineLength:
|
20
|
+
Description: 'Checks that line length does not exceed the configured limit.'
|
21
|
+
StyleGuide: '#max-line-length'
|
8
22
|
Enabled: true
|
9
|
-
|
23
|
+
VersionAdded: '0.25'
|
24
|
+
VersionChanged: '0.84'
|
25
|
+
AutoCorrect: false
|
26
|
+
Max: 130
|
27
|
+
# To make it possible to copy or click on URIs in the code, we allow lines
|
28
|
+
# containing a URI to be longer than Max.
|
29
|
+
AllowHeredoc: true
|
30
|
+
AllowURI: true
|
31
|
+
URISchemes:
|
32
|
+
- http
|
33
|
+
- https
|
34
|
+
# The IgnoreCopDirectives option causes the LineLength rule to ignore cop
|
35
|
+
# directives like '# rubocop: enable ...' when calculating a line's length.
|
36
|
+
IgnoreCopDirectives: true
|
37
|
+
# The IgnoredPatterns option is a list of !ruby/regexp and/or string
|
38
|
+
# elements. Strings will be converted to Regexp objects. A line that matches
|
39
|
+
# any regular expression listed in this option will be ignored by LineLength.
|
40
|
+
AllowedPatterns: ['(^\s*\#.*)|(.*\s\#.*)']
|
10
41
|
|
11
|
-
|
42
|
+
Metrics/BlockLength:
|
43
|
+
Description: 'Avoid long blocks with many lines.'
|
12
44
|
Enabled: true
|
13
|
-
|
45
|
+
VersionAdded: '0.44'
|
46
|
+
VersionChanged: '0.87'
|
47
|
+
CountComments: false # count full line comments?
|
48
|
+
Max: 100
|
49
|
+
CountAsOne: []
|
50
|
+
IgnoredMethods:
|
51
|
+
# By default, exclude the `#refine` method, as it tends to have larger
|
52
|
+
# associated blocks.
|
53
|
+
- refine
|
54
|
+
Exclude:
|
55
|
+
- '**/*.gemspec'
|
56
|
+
|
57
|
+
Metrics/ClassLength:
|
58
|
+
Description: 'Avoid classes longer than 100 lines of code.'
|
59
|
+
Enabled: true
|
60
|
+
VersionAdded: '0.25'
|
61
|
+
VersionChanged: '0.87'
|
62
|
+
CountComments: false # count full line comments?
|
63
|
+
Max: 300
|
64
|
+
CountAsOne: []
|
65
|
+
|
66
|
+
Metrics/CyclomaticComplexity:
|
67
|
+
Description: >-
|
68
|
+
A complexity metric that is strongly correlated to the number
|
69
|
+
of test cases needed to validate a method.
|
70
|
+
Enabled: true
|
71
|
+
VersionAdded: '0.25'
|
72
|
+
VersionChanged: '0.81'
|
73
|
+
IgnoredMethods: []
|
74
|
+
Max: 15
|
75
|
+
|
76
|
+
Metrics/MethodLength:
|
77
|
+
Description: 'Avoid methods longer than 10 lines of code.'
|
78
|
+
StyleGuide: '#short-methods'
|
79
|
+
Enabled: true
|
80
|
+
VersionAdded: '0.25'
|
81
|
+
VersionChanged: '0.87'
|
82
|
+
CountComments: false # count full line comments?
|
83
|
+
Max: 100
|
84
|
+
CountAsOne: []
|
85
|
+
IgnoredMethods: []
|
86
|
+
|
87
|
+
Metrics/ModuleLength:
|
88
|
+
Description: 'Avoid modules longer than 100 lines of code.'
|
89
|
+
Enabled: true
|
90
|
+
VersionAdded: '0.31'
|
91
|
+
VersionChanged: '0.87'
|
92
|
+
CountComments: false # count full line comments?
|
93
|
+
Max: 400
|
94
|
+
CountAsOne: []
|
95
|
+
|
96
|
+
Metrics/ParameterLists:
|
97
|
+
Description: 'Avoid parameter lists longer than three or four parameters.'
|
98
|
+
StyleGuide: '#too-many-params'
|
99
|
+
Enabled: true
|
100
|
+
VersionAdded: '0.25'
|
101
|
+
Max: 7
|
102
|
+
CountKeywordArgs: true
|
103
|
+
|
104
|
+
Metrics/PerceivedComplexity:
|
105
|
+
Description: >-
|
106
|
+
A complexity metric geared towards measuring complexity for a
|
107
|
+
human reader.
|
108
|
+
Enabled: true
|
109
|
+
VersionAdded: '0.25'
|
110
|
+
VersionChanged: '0.81'
|
111
|
+
IgnoredMethods: []
|
112
|
+
Max: 20
|
14
113
|
|
15
|
-
Layout/LineLength:
|
16
|
-
Max: 120
|
data/README.md
CHANGED
@@ -1,35 +1,27 @@
|
|
1
1
|
# Rubocop::Intum
|
2
2
|
|
3
|
-
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/rubocop/intum`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
-
|
5
|
-
TODO: Delete this and the text above, and describe your gem
|
6
|
-
|
7
3
|
## Installation
|
8
|
-
|
4
|
+
|
9
5
|
Add this line to your application's Gemfile:
|
10
6
|
|
11
7
|
```ruby
|
12
|
-
gem 'rubocop-intum'
|
8
|
+
gem 'rubocop-intum', require: false
|
13
9
|
```
|
14
10
|
|
15
|
-
And
|
16
|
-
|
17
|
-
$ bundle install
|
18
|
-
|
19
|
-
Or install it yourself as:
|
20
|
-
|
21
|
-
$ gem install rubocop-intum
|
11
|
+
And add to the top of your project's RuboCop configuration file (`.rubocop.yml`) :
|
22
12
|
|
23
|
-
|
13
|
+
```yml
|
14
|
+
inherit_gem:
|
15
|
+
rubocop-intum: rubocop.yml
|
16
|
+
```
|
17
|
+
example: [.rubocop.yml](/.rubocop.yml)
|
24
18
|
|
25
|
-
|
19
|
+
Recommended Gems:
|
26
20
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/rubocop-intum.
|
21
|
+
```ruby
|
22
|
+
gem "rubocop", ">= 1.32.0", require: false
|
23
|
+
gem "rubocop-minitest", ">= 0.21.0", require: false
|
24
|
+
gem "rubocop-performance", ">= 1.14.3", require: false
|
25
|
+
gem "rubocop-rails", ">= 2.15.2", require: false
|
26
|
+
gem "rubocop-intum", ">= 0.1.2", require: false
|
27
|
+
```
|
data/rubocop.yml
CHANGED
@@ -119,7 +119,7 @@ Metrics/AbcSize:
|
|
119
119
|
VersionChanged: '0.81'
|
120
120
|
# The ABC size is a calculated magnitude, so this number can be an Integer or
|
121
121
|
# a Float.
|
122
|
-
|
122
|
+
AllowedMethods: []
|
123
123
|
Max: 50
|
124
124
|
|
125
125
|
|
@@ -204,7 +204,7 @@ Style/BlockDelimiters:
|
|
204
204
|
# This looks at the usage of a block's method to determine its type (e.g. is
|
205
205
|
# the result of a `map` assigned to a variable or passed to another
|
206
206
|
# method) but exceptions are permitted in the `ProceduralMethods`,
|
207
|
-
# `FunctionalMethods` and `
|
207
|
+
# `FunctionalMethods` and `AllowedMethods` sections below.
|
208
208
|
- semantic
|
209
209
|
# The `braces_for_chaining` style enforces braces around single line blocks
|
210
210
|
# and do..end around multi-line blocks, except for multi-line blocks whose
|
@@ -245,7 +245,7 @@ Style/BlockDelimiters:
|
|
245
245
|
- let!
|
246
246
|
- subject
|
247
247
|
- watch
|
248
|
-
|
248
|
+
AllowedMethods:
|
249
249
|
# Methods that can be either procedural or functional and cannot be
|
250
250
|
# categorised from their usage alone, e.g.
|
251
251
|
#
|
@@ -287,7 +287,7 @@ Style/BlockDelimiters:
|
|
287
287
|
# collection.each do |element| puts element end
|
288
288
|
AllowBracesOnProceduralOneLiners: false
|
289
289
|
# The BracesRequiredMethods overrides all other configurations except
|
290
|
-
#
|
290
|
+
# AllowedMethods. It can be used to enforce that all blocks for specific
|
291
291
|
# methods use braces. For example, you can use this to enforce Sorbet
|
292
292
|
# signatures use braces even when the rest of your codebase enforces
|
293
293
|
# the `line_count_based` style.
|
@@ -512,7 +512,7 @@ Style/NumericPredicate:
|
|
512
512
|
SupportedStyles:
|
513
513
|
- predicate
|
514
514
|
- comparison
|
515
|
-
|
515
|
+
AllowedMethods: []
|
516
516
|
# Exclude RSpec specs because assertions like `expect(1).to be > 0` cause
|
517
517
|
# false positives.
|
518
518
|
Exclude:
|
@@ -581,7 +581,7 @@ Style/SymbolProc:
|
|
581
581
|
VersionChanged: '0.64'
|
582
582
|
# A list of method names to be ignored by the check.
|
583
583
|
# The names should be fairly unique, otherwise you'll end up ignoring lots of code.
|
584
|
-
|
584
|
+
AllowedMethods:
|
585
585
|
- respond_to
|
586
586
|
- define_method
|
587
587
|
|
@@ -768,7 +768,7 @@ Layout/ParameterAlignment:
|
|
768
768
|
|
769
769
|
Style/MethodCallWithArgsParentheses:
|
770
770
|
Enabled: false
|
771
|
-
#
|
771
|
+
# AllowedMethods:
|
772
772
|
# - require
|
773
773
|
# - require_relative
|
774
774
|
# - require_dependency
|
@@ -776,4 +776,12 @@ Style/MethodCallWithArgsParentheses:
|
|
776
776
|
# - raise
|
777
777
|
# - puts
|
778
778
|
# Exclude:
|
779
|
-
# - "/**/Gemfile"
|
779
|
+
# - "/**/Gemfile"
|
780
|
+
|
781
|
+
Rails/WhereExists:
|
782
|
+
EnforcedStyle: where
|
783
|
+
Enabled: true
|
784
|
+
|
785
|
+
Style/ClassMethodsDefinitions:
|
786
|
+
EnforcedStyle: def_self
|
787
|
+
Enabled: true
|
metadata
CHANGED
@@ -1,29 +1,35 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubocop-intum
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marcin
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-09-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubocop-shopify
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '2.10'
|
17
20
|
- - ">="
|
18
21
|
- !ruby/object:Gem::Version
|
19
|
-
version: 2.
|
22
|
+
version: 2.10.1
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
27
|
+
- - "~>"
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '2.10'
|
24
30
|
- - ">="
|
25
31
|
- !ruby/object:Gem::Version
|
26
|
-
version: 2.
|
32
|
+
version: 2.10.1
|
27
33
|
description: Write a longer description or delete this line.
|
28
34
|
email:
|
29
35
|
- marcin@radgost.com
|
@@ -44,7 +50,8 @@ files:
|
|
44
50
|
- rubocop.yml
|
45
51
|
- sig/rubocop/intum.rbs
|
46
52
|
homepage: https://github.com/intum/rubocop-intum
|
47
|
-
licenses:
|
53
|
+
licenses:
|
54
|
+
- MIT
|
48
55
|
metadata: {}
|
49
56
|
post_install_message:
|
50
57
|
rdoc_options: []
|