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 rubocop error for the constant by converting to uppercase - new #1562

Merged
merged 3 commits into from
Aug 20, 2023

Conversation

egemen-dev
Copy link
Contributor

@egemen-dev egemen-dev commented Aug 18, 2023

This PR fixes the rubocop issue of the Constant Name for the exercise concept of port-palermo. Since usage of uppercase constants are recommended by the rubocop docs and it is a good practice.

This PR is the new version of the previous one. I mistakenly deleted the previous one with the forked repo so, I had to open a new one.

@github-actions
Copy link
Contributor

github-actions bot commented Aug 18, 2023

@github-actions github-actions bot closed this Aug 18, 2023
@kotp kotp reopened this Aug 18, 2023
Copy link
Member

@kotp kotp left a comment

Choose a reason for hiding this comment

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

Awaiting approval/comments/direction from @meatball133 .


```ruby
Port::Identifier
Port::IDENTIFIER
Copy link
Member

Choose a reason for hiding this comment

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

@meatball133 thoughts? Should we not have it as a comment, but have it as explicit code instead?

Copy link
Member

Choose a reason for hiding this comment

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

Do you mean like in the stub file, that we give them the constant but let them define it by themself?

Copy link
Member

Choose a reason for hiding this comment

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

Yeah. Because what is presented here is different than how they would likely define it, though by adding an equals sign and a value to this exact syntax, it could be assigned. I am not sure how important it is to tell them to define the constant if we give them that line in the code... seems like "check the box" rather than "see how a constant is defined", compared to this instruction set and having them find out how to define a constant in that name space.

It might be more straight forward just to do it for them. It is not a complex idea.

Copy link
Member

@meatball133 meatball133 Aug 20, 2023

Choose a reason for hiding this comment

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

Yeah, I am fine either, the goal is to teach how to define a symbol. So in a way, there is no need to have the define constant part, but that is some repetition on how to do it.

@@ -1,5 +1,5 @@
module Port
# TODO: define the 'Identifier' constant
# TODO: define the 'IDENTIFIER' constant
Copy link
Member

Choose a reason for hiding this comment

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

@meatball133 the comment earlier was specifically regarding this submitted version to the student.

Copy link
Member

Choose a reason for hiding this comment

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

In response to this yes...

@kotp kotp self-assigned this Aug 19, 2023
@kotp kotp added enhancement in progress ruby Pull requests that update Ruby code x:status/claimed Someone is working on this issue labels Aug 19, 2023
@kotp kotp merged commit f369455 into exercism:main Aug 20, 2023
4 checks passed
@kotp
Copy link
Member

kotp commented Aug 20, 2023

Thank you @egemen-dev .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement in progress ruby Pull requests that update Ruby code x:status/claimed Someone is working on this issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants