rubocop / rubocop/ruby-style-guide

File naming with acronyms

Open
#842 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
No language data
Stars
16.5k
Forks
3.3k
PR merge metrics
No merged PRs in 30d

Description

The guide doesn't give any specification about file naming in the case of acronyms in the class name. https://github.com/rubocop-hq/ruby-style-guide#snake-case-for-files

Following the logic that each word should be separated by an underscore in the file name and a capital letter in the class name, one might expect that the class "SomeXML" should be translated into "some_x_m_l.rb".

This however does not work with Rails and there is no mention of class naming in the rails guide.

This might be a useful addition to this guide.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked snake-case-for-files section and compare its wording with the Rails guide's handling of acronyms. Clarify how class names such as SomeXML should map to filenames, then update this guide so the convention and its expected result are explicit.

Written by the indexing model from the issue text.

Assessment

Tech stack
rails, ruby
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.