betterlint 1.2.1 → 1.3.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: 91782f59f8a8101bb7e6d431d0e5f6e095ae6c4beed07485534bbf11406a32e3
4
- data.tar.gz: 4d336df923e86b2f2f820f073e8813779452512912122de398ee2fd19a8c9d8b
3
+ metadata.gz: ebb6e68b6d90e1e43f139fd59a23d2d2b865cd7d3f7f61d0f5902a46af69d27c
4
+ data.tar.gz: c972a12126132210bab98d3940c4b3f8fa7c97b96b43545c7bd8b761d392bf8b
5
5
  SHA512:
6
- metadata.gz: cc5684ed82435f46ca36e99fa251073489ce870f15c9bb1484b43b4901049b1313fe6c5995fba020b0db717f0ebcac729ed09a68e889c25d4c148602da13a778
7
- data.tar.gz: '08c7298e7cd72fff069fe3870b2f853816658ddafe9871b86c957eae8d5aa218e8893381db8fac530160c1cc7f920bcff1aabc67d4ab2bd2e9d77db6705ba8be'
6
+ metadata.gz: 51c1300093be37f6d7c8a293ac20e947ddcc2e81009394eb842fcf764729b4371689a610fe51e1892ea61e7e137095589a134dc4412d7c0e8ea3453d0337a2df
7
+ data.tar.gz: cb945dc1dac79acacad2619aeceec82ce44081e76d5d73682801a3f3f8ad2248eaf8f3aed9ba5e2f1aa9c942e4e568006b60bcc07c0a80a2ffe9299ef9b2853c
data/config/default.yml CHANGED
@@ -19,6 +19,7 @@ AllCops:
19
19
  - 'Gemfile'
20
20
  DisplayStyleGuide: true
21
21
  DisplayCopNames: true
22
+ NewCops: enable
22
23
 
23
24
  Betterment:
24
25
  StyleGuideBaseURL: https://github.com/Betterment/betterlint
@@ -36,7 +36,9 @@ module RuboCop
36
36
  end
37
37
 
38
38
  def possible_methods_within(node)
39
- if node.body.begin_type?
39
+ if node.body.nil?
40
+ []
41
+ elsif node.body.begin_type?
40
42
  node.body.children
41
43
  else
42
44
  [node.body]
@@ -21,7 +21,7 @@ module RuboCop
21
21
 
22
22
  def on_def(node)
23
23
  (method_name, ivar_assign) = memoized?(node)
24
- return if ivar_assign.nil? || node.arguments.length.zero? || method_name == :initialize
24
+ return if ivar_assign.nil? || node.arguments.empty? || method_name == :initialize
25
25
 
26
26
  msg = format(MSG, method: method_name)
27
27
  add_offense(node, location: ivar_assign.source_range, message: msg)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: betterlint
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Development
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-11-29 00:00:00.000000000 Z
11
+ date: 2023-02-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop
@@ -80,48 +80,6 @@ dependencies:
80
80
  - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
- - !ruby/object:Gem::Dependency
84
- name: bundler
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - ">="
88
- - !ruby/object:Gem::Version
89
- version: '0'
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - ">="
95
- - !ruby/object:Gem::Version
96
- version: '0'
97
- - !ruby/object:Gem::Dependency
98
- name: rake
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - ">="
102
- - !ruby/object:Gem::Version
103
- version: 12.3.3
104
- type: :development
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - ">="
109
- - !ruby/object:Gem::Version
110
- version: 12.3.3
111
- - !ruby/object:Gem::Dependency
112
- name: rspec-rails
113
- requirement: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - ">="
116
- - !ruby/object:Gem::Version
117
- version: '0'
118
- type: :development
119
- prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- requirements:
122
- - - ">="
123
- - !ruby/object:Gem::Version
124
- version: '0'
125
83
  description: Betterment rubocop configuration
126
84
  email:
127
85
  - development@betterment.com