Skip to content

Conversation

@Morriar
Copy link
Contributor

@Morriar Morriar commented Jan 8, 2026

Also enable Sorbet/ForbidTEnum cop after that.

@Morriar Morriar requested a review from a team as a code owner January 8, 2026 16:45
@Morriar Morriar self-assigned this Jan 8, 2026
Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
@amomchilov amomchilov changed the title Migrate all T::Struct usages to bare Ruby classes Migrate all T::Enum usages to bare Ruby classes Jan 8, 2026
Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
when "protected" then Protected
when "private" then Private
else
raise Error, "Invalid visibility: #{name}"
Copy link
Member

Choose a reason for hiding this comment

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

I think it might be better to raise ArgumentError here:

Suggested change
raise Error, "Invalid visibility: #{name}"
raise ArgumentError, "Invalid visibility: #{name}"

def yellow(string); end
end

Spoom::Cli::Helper::HIGHLIGHT_COLOR = T.let(T.unsafe(nil), Spoom::Color)
Copy link
Member

Choose a reason for hiding this comment

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

Where did this come from?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It should be definitely be here: https://github.com/Shopify/spoom/blob/main/lib/spoom/cli/helper.rb#L106.

I think it wasn't before because the constant was pointing to the enum variant instead of a real constant.

Copy link
Member

Choose a reason for hiding this comment

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

Ah, makes sense!

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.

3 participants