rubocop-intum 0.1.2 → 0.1.4

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: e74e2b727e630a00017360a2a62b993ab5bd61f5ef974326dcc6579e16ea7176
4
- data.tar.gz: 28760b09de530babdbcb24c08666262af6f10552b1f459f9d0fc2deacb997824
3
+ metadata.gz: 91663a3b40a2838cc3a322c54c3fda8d8c1aca73a634e38a96665c3aa38786ee
4
+ data.tar.gz: 606e19e9eebea1d97a0e29d956fcd9b0ed18f230a3624eecc8ad37f21d1b1a78
5
5
  SHA512:
6
- metadata.gz: 8feb1ba964dbd794d1e4eddcc99be79a95ca53b4f684c7ff557425685e85d1f46e9fd7df47fd36f0cf6d45018fdb2878a6e35713dc3d33e08a93105c85fb144b
7
- data.tar.gz: 5a43bf3027e8a4c19a8862196c5a501f69c6119c73708dd8ef888bd68e740ce88900c81ea0c888b5c97d253c8812be0d914e240111bd8a65924651e217392d69
6
+ metadata.gz: 5a86e39529cc2c51e9ed1ea161987e529685e8cbfce793b82f3e9d26b2e3219502a2910e40387a9f1a70ff090ab28fae53a3c6571f2346be7e5a8945e99fc2c6
7
+ data.tar.gz: 169baffde8d49aa0e6f62a0cd150fc530d696f8e0d1909afe806e05a27149bd21451b2cd98eeb03b70db15a9b8589535ff97a35b515757ff0912f4619854dd39
data/.rubocop.yml CHANGED
@@ -1,16 +1,113 @@
1
- inherit_from:
2
- - rubocop.yml
1
+ inherit_gem:
2
+ rubocop-intum: rubocop.yml
3
3
 
4
4
  AllCops:
5
- TargetRubyVersion: 2.6
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
- Style/StringLiterals:
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
- EnforcedStyle: double_quotes
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
- Style/StringLiteralsInInterpolation:
42
+ Metrics/BlockLength:
43
+ Description: 'Avoid long blocks with many lines.'
12
44
  Enabled: true
13
- EnforcedStyle: double_quotes
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 then execute:
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
- ## Usage
13
+ ```yml
14
+ inherit_gem:
15
+ rubocop-intum: rubocop.yml
16
+ ```
17
+ example: [.rubocop.yml](/.rubocop.yml)
24
18
 
25
- TODO: Write usage instructions here
19
+ Recommended Gems:
26
20
 
27
- ## Development
28
-
29
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test-unit` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
-
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
-
33
- ## Contributing
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
+ ```
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Rubocop
4
4
  module Intum
5
- VERSION = "0.1.2"
5
+ VERSION = "0.1.4"
6
6
  end
7
7
  end
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
- IgnoredMethods: []
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 `IgnoredMethods` sections below.
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
- IgnoredMethods:
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
- # IgnoredMethods. It can be used to enforce that all blocks for specific
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
- IgnoredMethods: []
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
- IgnoredMethods:
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
- # IgnoredMethods:
771
+ # AllowedMethods:
772
772
  # - require
773
773
  # - require_relative
774
774
  # - require_dependency
@@ -776,4 +776,15 @@ 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
788
+
789
+ Style/TrailingCommaInArguments:
790
+ EnforcedStyleForMultiline: no_comma
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.2
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcin
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-08-03 00:00:00.000000000 Z
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.8.0
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.8.0
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: []