rubocop / rubocop/ruby-style-guide

Mark every rules with levels of requirements.

Open
#521 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Being a non-native English speaker I sometimes have difficulties reading the style guide, especially when it comes to a rule is partially overriding another.

It is clear to me that, say, #parens-as-args is a very strong requirement. It has no conflicting rules. It seems no one shall never ever break this rule.

On the other hand, for instance #ternary-operator has several follow-up rules to describe exceptional situations where this rule should not apply. It seems this rule is not as strong as #parens-as-args.

There also are rules that comes with options; like #consistent-string-literals. It seems the rule is even weaker than #ternary-operator.

I might be wrong. I could have misread something. But the problem is subtleness in the language, which makes it difficult to understand. Being a guide it should be as clear as possible.

I'd like to propose terminology described in RFC2119. They are not only Internet standard, but quite widely used -- which should suit the concept of this style 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

Read the linked RFC2119 terminology and compare the examples in #parens-as-args, #ternary-operator, and #consistent-string-literals. Determine how requirement levels could be applied consistently across the style guide and what completion would mean for every rule to have an unambiguous level.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
documentation
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.