Skip to content

Commit 105b482

Browse files
committed
Drop --enable-experimental-rbs-comments and let sorbet rely on .rbs files
1 parent ca0eb72 commit 105b482

File tree

22 files changed

+474
-248
lines changed

22 files changed

+474
-248
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,12 @@ jobs:
5656
- name: Steep
5757
run: bundle exec steep check
5858

59-
- name: RBS Inline
60-
run: bundle exec rake rbs_inline
61-
6259
- name: Sorbet
6360
run: bundle exec srb tc
6461

62+
- name: RBS Inline
63+
run: bundle exec rake rbs_inline
64+
6565
- name: clang-tidy version
6666
run: clang-tidy-21 --version
6767

lib/herb/ast/node.rb

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,9 @@ module Herb
99
#| }
1010
module AST
1111
class Node
12-
#: String
13-
attr_reader :type
14-
#: Location
15-
attr_reader :location
16-
#: Array[Herb::Errors::Error]
17-
attr_reader :errors
12+
attr_reader :type #: String
13+
attr_reader :location #: Location
14+
attr_reader :errors #: Array[Herb::Errors::Error]
1815

1916
#: (String, Location, ?Array[Herb::Errors::Error]) -> void
2017
def initialize(type, location, errors = [])

lib/herb/lex_result.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33

44
module Herb
55
class LexResult < Result
6-
#: TokenList
7-
attr_reader :value
6+
attr_reader :value #: TokenList
87

98
#: (Array[Herb::Token], String, Array[Herb::Warnings::Warning], Array[Herb::Errors::Error]) -> void
109
def initialize(value, source, warnings, errors)

lib/herb/location.rb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,8 @@ module Herb
77
#| end: serialized_position
88
#| }
99
class Location
10-
#: Position
11-
attr_reader :start
12-
#: Position
13-
attr_reader :end
10+
attr_reader :start #: Position
11+
attr_reader :end #: Position
1412

1513
#: (Position, Position) -> void
1614
def initialize(start_position, end_position)

lib/herb/position.rb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,8 @@
44
module Herb
55
#: type serialized_position = { line: Integer, column: Integer }
66
class Position
7-
#: Integer
8-
attr_reader :line
9-
#: Integer
10-
attr_reader :column
7+
attr_reader :line #: Integer
8+
attr_reader :column #: Integer
119

1210
#: (Integer, Integer) -> void
1311
def initialize(line, column)

lib/herb/range.rb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,8 @@
44
module Herb
55
#: type serialized_range = [Integer, Integer]
66
class Range
7-
#: Integer
8-
attr_reader :from
9-
#: Integer
10-
attr_reader :to
7+
attr_reader :from #: Integer
8+
attr_reader :to #: Integer
119

1210
#: (Integer, Integer) -> void
1311
def initialize(from, to)

lib/herb/result.rb

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,9 @@
33

44
module Herb
55
class Result
6-
#: String
7-
attr_reader :source
8-
#: Array[Herb::Warnings::Warning]
9-
attr_reader :warnings
10-
#: Array[Herb::Errors::Error]
11-
attr_reader :errors
6+
attr_reader :source #: String
7+
attr_reader :warnings #: Array[Herb::Warnings::Warning]
8+
attr_reader :errors #: Array[Herb::Errors::Error]
129

1310
#: (String, Array[Herb::Warnings::Warning], Array[Herb::Errors::Error]) -> void
1411
def initialize(source, warnings, errors)

lib/herb/warnings.rb

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,9 @@ module Warnings
99
#| message: String
1010
#| }
1111
class Warning
12-
#: String
13-
attr_reader :type
14-
#: Location?
15-
attr_reader :location
16-
#: String
17-
attr_reader :message
12+
attr_reader :type #: String
13+
attr_reader :location #: Location?
14+
attr_reader :message #: String
1815

1916
#: (String, Location, String) -> void
2017
def initialize(type, location, message)

sig/herb/ast/helpers.rbs

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sig/herb/ast/node.rbs

Lines changed: 7 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)