Skip to content

Commit f530b2e

Browse files
committed
Done todo
1 parent 1f11054 commit f530b2e

File tree

4 files changed

+40
-107
lines changed

4 files changed

+40
-107
lines changed

.rubocop.yml

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,45 @@
11
inherit_from:
22
- https://github.com/onk/onkcop/raw/v0.51.0.0/config/rubocop.yml
3-
- .rubocop_todo.yml
43

54
AllCops:
65
TargetRubyVersion: 2.2
76
Exclude:
87
- 'bin/**/*'
8+
9+
# TODO: Remove this config after droping Ruby 2.2 support
10+
Layout/IndentHeredoc:
11+
Include:
12+
- 'test/**/*'
13+
14+
Lint/AssignmentInCondition:
15+
Enabled: false
16+
17+
Lint/HandleExceptions:
18+
Enabled: false
19+
20+
Naming/HeredocDelimiterNaming:
21+
Enabled: false
22+
23+
Style/BlockDelimiters:
24+
Enabled: false
25+
26+
Style/MultilineBlockChain:
27+
Enabled: false
28+
29+
Style/Semicolon:
30+
Enabled: false
31+
32+
Metrics/AbcSize:
33+
Max: 50
34+
35+
Metrics/BlockLength:
36+
Max: 30
37+
38+
Metrics/MethodLength:
39+
Max: 40
40+
41+
Metrics/ModuleLength:
42+
Enabled: false
43+
44+
Metrics/LineLength:
45+
Max: 200

.rubocop_todo.yml

Lines changed: 0 additions & 102 deletions
This file was deleted.

lib/language_server.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,7 @@ def notify(method:, params: {})
3737

3838
method = request[:method].to_sym
3939

40-
_, subscriber = subscribers.find { |k, _|
41-
k === method
42-
}
40+
subscriber = subscribers[method]
4341

4442
if subscriber
4543
keys = subscriber.parameters.map(&:last)

lib/language_server/project/parser.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def on_stmts_add(*args)
7878
end
7979

8080
def on_assign(left, right)
81-
result.constants << left if Constant === left
81+
result.constants << left if left.instance_of?(Constant)
8282

8383
left.value = right if left.respond_to?(:value) # TODO: remove this condition
8484
left

0 commit comments

Comments
 (0)