Skip to content

Commit d0251d8

Browse files
authored
[1.2.0] Cleaned up project (#15)
1 parent 35b7423 commit d0251d8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+31
-44
lines changed

.rubocop_todo.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This configuration was generated by
22
# `rubocop --auto-gen-config`
3-
# on 2026-03-27 06:40:04 UTC using RuboCop version 1.84.0.
3+
# on 2026-03-27 10:42:03 UTC using RuboCop version 1.84.0.
44
# The point is for the user to remove these configuration records
55
# one by one as the offenses are removed from the code base.
66
# Note that changes in the inspected code, or installation of new
@@ -82,12 +82,12 @@ Naming/PredicateMethod:
8282
RSpec/DescribeClass:
8383
Enabled: false
8484

85-
# Offense count: 135
85+
# Offense count: 136
8686
# Configuration parameters: CountAsOne.
8787
RSpec/ExampleLength:
88-
Max: 34
88+
Max: 33
8989

90-
# Offense count: 121
90+
# Offense count: 122
9191
RSpec/MultipleExpectations:
9292
Max: 7
9393

@@ -111,7 +111,7 @@ Style/Documentation:
111111
- 'lib/docscribe/config/template.rb'
112112
- 'lib/docscribe/config/utils.rb'
113113

114-
# Offense count: 3
114+
# Offense count: 5
115115
# This cop supports safe autocorrection (--autocorrect).
116116
Style/IfUnlessModifier:
117117
Exclude:
@@ -125,7 +125,7 @@ Style/SafeNavigationChainLength:
125125
Exclude:
126126
- 'lib/docscribe/inline_rewriter/doc_builder.rb'
127127

128-
# Offense count: 9
128+
# Offense count: 7
129129
# This cop supports safe autocorrection (--autocorrect).
130130
# Configuration parameters: AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, AllowRBSInlineAnnotation, AllowCopDirectives, AllowedPatterns, SplitStrings.
131131
# URISchemes: http, https

README.md

Lines changed: 16 additions & 22 deletions

lib/docscribe/inline_rewriter.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ def format_attribute_param_tag(indent, name, type, style:)
562562
type = type.to_s
563563

564564
case style.to_s
565-
when 'name_first'
565+
when 'name_type'
566566
"#{indent}# @param #{name} [#{type}]"
567567
else
568568
"#{indent}# @param [#{type}] #{name}"
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
require 'rbconfig'
66

77
RSpec.describe 'CLI -a' do
8-
let(:exe) { File.expand_path('../exe/docscribe', __dir__) }
9-
108
it 'applies safe doc updates in place' do
119
Dir.mktmpdir do |dir|
1210
path = File.join(dir, 'abc.rb')
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
RSpec.describe 'CLI docscribe' do
66
it 'reads from --stdin and outputs docs' do
7-
exe = File.expand_path('../exe/docscribe', __dir__)
87
code = <<~RUBY
98
class D; def x; 1; end; end
109
RUBY
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
require 'rbconfig'
66

77
RSpec.describe 'docscribe init' do
8-
let(:exe) { File.expand_path('../exe/docscribe', __dir__) }
9-
108
it 'creates docscribe.yml by default' do
119
Dir.mktmpdir do |dir|
1210
_out, _err, status = Open3.capture3(RbConfig.ruby, exe, 'init', chdir: dir)
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
require 'rbconfig'
77

88
RSpec.describe 'CLI parse error handling' do
9-
let(:exe) { File.expand_path('../exe/docscribe', __dir__) }
10-
119
it 'continues when one file has a syntax error and exits non-zero' do
1210
Dir.mktmpdir do |dir|
1311
File.write(File.join(dir, 'a_bad.rb'), <<~RUBY)
Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ def skip_unless_sorbet_bridge_available!
1919
it 'loads Sorbet RBI signatures from --rbi-dir and uses them for @param/@return' do
2020
skip_unless_sorbet_bridge_available!
2121

22-
exe = File.expand_path('../exe/docscribe', __dir__)
23-
2422
Dir.mktmpdir do |dir|
2523
FileUtils.mkdir_p(File.join(dir, 'sorbet/rbi'))
2624

@@ -64,8 +62,6 @@ def foo(verbose:)
6462
it 'uses inline sigs from stdin when --sorbet is enabled' do
6563
skip_unless_sorbet_bridge_available!
6664

67-
exe = File.expand_path('../exe/docscribe', __dir__)
68-
6965
code = <<~RUBY
7066
class Demo
7167
extend T::Sig
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
skip 'RBS not available'
1414
end
1515

16-
exe = File.expand_path('../exe/docscribe', __dir__)
17-
1816
Dir.mktmpdir do |dir|
1917
FileUtils.mkdir_p(File.join(dir, 'sig'))
2018

0 commit comments

Comments
 (0)