Uh oh!
There was an error while loading. Please reload this page.
Allow RBS inline annotation - #709
Merged
Merged
Conversation
Type signature for Ruby (rbs) allow type checkers (e.g. steep) to statically check for issues in a code base. Developpers must sometimes provide hints when initializing a data structure (e.g. an empty Array) so that the type checker can properly check its usage. These hints are passed with an in-line comment like so: ``` results = [] #: Array[Integer] ``` Rubocop added support for such comments as on option in its Layout/LeadingEmptyLines check in version 1.67.0. This gem currently use a newer version so this option is available but not enabled yet. Enable this option to make it possible to use both rbs and standard at the same time.
smortex
marked this pull request as ready for review
April 5, 2025 20:52
TonyCTHsu added a commit
to DataDog/dd-trace-rb
that referenced
this pull request
Jul 9, 2026
Filed standardrb/standard#820 to add AllowSteepAnnotation: true to standard's own base config, following the precedent set by RBS support in standardrb/standard#709. If merged and released, we can drop our Layout/LeadingCommentSpace override here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR add support for RBS in-line annotations.
It replaces #656 which did that but also updated rubocop and had unrelated
changes. Rubocop was updated to a compatible version with #659, so we just
have to turn on the corresponding option of the rubocop check.