-
-
Notifications
You must be signed in to change notification settings - Fork 518
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
Conversation
https://forum.exercism.org/t/fix-rubocop-error-for-the-constant-by-converting-to-uppercase/6958/3 is the forum post for this PR. Pre-approved. |
There was a problem hiding this 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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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...
Thank you @egemen-dev . |
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.