rubocop-on-rbs 0.5.0 → 0.6.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: 889ce959e28673f250187124bfd7955879317482cfdfb976f4bdb975fc918c5b
4
- data.tar.gz: 0e0654669928cacd44ca23ad5ece90521ac21660758277fe0af42d3b33377d5b
3
+ metadata.gz: 05fc386350ef8ab36fc84937e1c3d5f2abdd95e816c8fc4a3ce80f41791475aa
4
+ data.tar.gz: 5b38f37836d5858ff196abd454bbfa14432ffdca49f8e89cfc88e61490da6d61
5
5
  SHA512:
6
- metadata.gz: 1556cdd4bb1116f2f49aca75d39ed229f3f3074e33d338528cb051c97cbcd952f2cb4daec81e0186e54c0794d2c265609e56483c7addcf77ad5d648b2fc68a39
7
- data.tar.gz: c77872b3822c006c59d89a637f59366e63a58beb2a0ac7b8b351c1b4428ba353d7e1c8f2480faa5209258649eb25574008ffcb9ce2f25b815a7540b09da60c35
6
+ metadata.gz: 4845db99745dab9b0c833fc4bf67e848aab97ed5cbe9e23279d2cf6ff867d100357dac144a261e1af279b415aa49848603a631caac38ea9f4b3a7a2732097001
7
+ data.tar.gz: e316da95415babf17a4e9d8d59008e6cf9a47ccfef2ed745b90652be9baa76b96c88ace1d0693fa58ea6229dd46282d030413fdbc0c2f649d0db373730903c8d
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.5.0] - 2024-06-17
4
+
5
+ * Fix destructive change by @ksss in https://github.com/ksss/rubocop-on-rbs/pull/17
6
+ * Introduce cache by @ksss in https://github.com/ksss/rubocop-on-rbs/pull/18
7
+ * Fix bug for EmptyArgument by @ksss in https://github.com/ksss/rubocop-on-rbs/pull/19
8
+
3
9
  ## [0.4.0] - 2024-06-14
4
10
 
5
11
  * Split RuboCop task by @ksss in https://github.com/ksss/rubocop-on-rbs/pull/6
@@ -51,9 +51,6 @@ module RuboCop
51
51
  if processed_rbs_source.error
52
52
  on_rbs_parsing_error()
53
53
  else
54
- # HACK: Autocorrector needs to clear diagnostics
55
- processed_source.diagnostics.clear
56
-
57
54
  on_rbs_new_investigation()
58
55
 
59
56
  processed_rbs_source.decls.each do |decl|
@@ -113,6 +110,13 @@ module RuboCop
113
110
  def tokenize(source)
114
111
  ::RBS::Parser.lex(source).value.reject { |t| t.type == :tTRIVIA }
115
112
  end
113
+
114
+ private
115
+
116
+ # HACK: Required to autocorrect
117
+ def current_corrector
118
+ @current_corrector ||= RuboCop::Cop::Corrector.new(@processed_source) if @processed_rbs_source.valid_syntax?
119
+ end
116
120
  end
117
121
  end
118
122
  end
@@ -19,6 +19,10 @@ module RuboCop
19
19
  @error = e
20
20
  end
21
21
 
22
+ def valid_syntax?
23
+ @error.nil?
24
+ end
25
+
22
26
  def tokens
23
27
  @tokens ||= begin
24
28
  ::RBS::Parser.lex(buffer).value
@@ -2,6 +2,6 @@
2
2
 
3
3
  module RuboCop
4
4
  module RBS
5
- VERSION = '0.5.0'
5
+ VERSION = '0.6.0'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-on-rbs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ksss
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-06-17 00:00:00.000000000 Z
11
+ date: 2024-06-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rbs
@@ -101,6 +101,9 @@ homepage: https://github.com/ksss/rubocop-on-rbs
101
101
  licenses:
102
102
  - MIT
103
103
  metadata:
104
+ homepage_uri: https://github.com/ksss/rubocop-on-rbs
105
+ source_code_uri: https://github.com/ksss/rubocop-on-rbs
106
+ changelog_uri: https://github.com/ksss/rubocop-on-rbs
104
107
  rubygems_mfa_required: 'true'
105
108
  post_install_message:
106
109
  rdoc_options: []