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

Fix severity type for YAML converter spec #366

Conversation

straight-shoota
Copy link
Contributor

The return type of SeverityYamlConverter.from_yaml is Severity?, but the implementation of YAML::Serializable previously swallowed Nil values. This was recently fixed in crystal-lang/crystal#13238, so now the compiler complains about assigning a value of type Severity? to an ivar typed Severity (https://github.com/crystal-ameba/ameba/actions/runs/4592466318/jobs/8109527429#step:5:24).

This is only a minimal fix to make the spec succeed.
But it might be a good idea to change something about that Nil type. I don't think it really even works to have a Nil severity.

Copy link
Member

@veelenga veelenga left a comment

Choose a reason for hiding this comment

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

Thanks. I will take a look at what we need to do with nil severity.

@veelenga veelenga merged commit ef2d05e into crystal-ameba:master Apr 5, 2023
@straight-shoota straight-shoota deleted the fix/severity-spec-yaml-converter branch April 5, 2023 14:58
@Sija Sija added this to the 1.5.0 milestone May 1, 2023
@Sija Sija mentioned this pull request May 9, 2023
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.

None yet

3 participants