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

ConstantName and Structs #432

Closed
jurriaan opened this issue Aug 12, 2013 · 2 comments · Fixed by #433
Closed

ConstantName and Structs #432

jurriaan opened this issue Aug 12, 2013 · 2 comments · Fixed by #433
Assignees

Comments

@jurriaan
Copy link
Contributor

Person = Struct.new(:first_name, :last_name) do

end

gives this offence: Use SCREAMING_SNAKE_CASE for constants.

but,

Person = Struct.new(:first_name, :last_name)

does not.

Both are not constant definitions, so the
ConstantName offence shouldn't be triggered.

@yujinakayama
Copy link
Collaborator

I'll take a look. Though I guess this is an issue in ConstantName, not MethodAndVariableSnakeCase.

@jurriaan
Copy link
Contributor Author

I've changed the issue to ConstantName.
I created the issue without having a good look at the code. Sorry 'bout that.
Saw this test (accepts assigning to camel case constant) and thought it belonged to MethodAndVariableSnakeCase. Thanks for the fix :)

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 a pull request may close this issue.

2 participants