Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite documents with yard #1635

Merged
merged 5 commits into from
Dec 4, 2021
Merged

Rewrite documents with yard #1635

merged 5 commits into from
Dec 4, 2021

Conversation

st0012
Copy link
Collaborator

@st0012 st0012 commented Dec 3, 2021

Given that yard is still the major format for Ruby documentation, using it to document SDK will make it more accessible for our users. More importantly, it provides a format for type information, which will be essential when we later add documentation for Sentry::Event and different event interfaces.

```
[warn]: Load Order / Name Resolution Problem on Rake::Application:
-
Something is trying to call mixins on object Rake::Application before it has been recognized.
This error usually means that you need to modify the order in which you parse files
so that Rake::Application is parsed before methods or other objects attempt to access it.
-
YARD will recover from this error and continue to parse but you *may* have problems
with your generated documentation. You should probably fix this.
-

[error]: Unhandled exception in YARD::Handlers::Ruby::MixinHandler:
  in `lib/sentry/rake.rb`:31:

        31: Rake::Application.prepend(Sentry::Rake::Application)
```
@st0012 st0012 added this to the 4.9.0 milestone Dec 3, 2021
@st0012 st0012 self-assigned this Dec 3, 2021
@st0012 st0012 added this to In progress in 4.x via automation Dec 3, 2021
@codecov-commenter
Copy link

codecov-commenter commented Dec 3, 2021

Codecov Report

Merging #1635 (e828bfd) into master (a690020) will increase coverage by 0.00%.
The diff coverage is 87.50%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1635   +/-   ##
=======================================
  Coverage   98.51%   98.51%           
=======================================
  Files         133      133           
  Lines        7412     7415    +3     
=======================================
+ Hits         7302     7305    +3     
  Misses        110      110           
Impacted Files Coverage Δ
sentry-ruby/lib/sentry/backtrace.rb 96.61% <ø> (ø)
sentry-ruby/lib/sentry/envelope.rb 100.00% <ø> (ø)
sentry-ruby/lib/sentry/linecache.rb 100.00% <ø> (ø)
sentry-ruby/lib/sentry/net/http.rb 100.00% <ø> (ø)
sentry-ruby/lib/sentry/release_detector.rb 100.00% <ø> (ø)
sentry-ruby/lib/sentry/configuration.rb 98.41% <77.77%> (ø)
sentry-ruby/lib/sentry-ruby.rb 94.28% <100.00%> (ø)
sentry-ruby/lib/sentry/rake.rb 65.00% <100.00%> (+6.17%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a690020...e828bfd. Read the comment docs.

@st0012 st0012 modified the milestones: 4.9.0, 4.8.2 Dec 4, 2021
@st0012 st0012 merged commit efcf170 into master Dec 4, 2021
@st0012 st0012 deleted the integrate-yard branch December 4, 2021 10:34
4.x automation moved this from In progress to Done Dec 4, 2021
@st0012 st0012 modified the milestones: 4.8.2, 4.9.0 Dec 25, 2021
st0012 added a commit that referenced this pull request Jan 4, 2022
* Install yard

* Adopt yard format for documenting top-level APIs

* Fix YARD::Handlers::Ruby::MixinHandler in rake extension

```
[warn]: Load Order / Name Resolution Problem on Rake::Application:
-
Something is trying to call mixins on object Rake::Application before it has been recognized.
This error usually means that you need to modify the order in which you parse files
so that Rake::Application is parsed before methods or other objects attempt to access it.
-
YARD will recover from this error and continue to parse but you *may* have problems
with your generated documentation. You should probably fix this.
-

[error]: Unhandled exception in YARD::Handlers::Ruby::MixinHandler:
  in `lib/sentry/rake.rb`:31:

        31: Rake::Application.prepend(Sentry::Rake::Application)
```

* Mark private components

* Document configuration options with yard
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
4.x
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants