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

Strict type all non-test code #16

Merged
merged 10 commits into from
Jan 5, 2021
Merged

Strict type all non-test code #16

merged 10 commits into from
Jan 5, 2021

Conversation

dduugg
Copy link
Owner

@dduugg dduugg commented Jan 5, 2021

Upgrades all non-spec code to typed: strict. Runtime checks are performed only in tests, to minimize performance impact.

I had to update the sorbet/ dir to pick up a sorbet-typed change so sorbet would permit a call to YARD::CodeObjects::ClassObject.new. Sorry for the noise introduced to the diff, but it's isolated to a single commit. (I could also extract to a separate PR if you'd like.)

@dduugg dduugg requested a review from KaanOzkan January 5, 2021 18:44
@codecov
Copy link

codecov bot commented Jan 5, 2021

Codecov Report

Merging #16 (1719e54) into master (ab1ae44) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##            master       #16   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            2         2           
  Lines          240       240           
=========================================
  Hits           240       240           

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 ab1ae44...1719e54. Read the comment docs.

abstract: false,
params: {},
return: nil
}
parsed[:abstract] = false
parsed[:params] = {}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that they are part of the declaration we can remove these 2 lines

parsed[:abstract] = false
parsed[:params] = {}

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice catch, fixed!

@dduugg dduugg merged commit 97c866f into master Jan 5, 2021
@dduugg dduugg deleted the strict-lib branch January 5, 2021 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants