Skip to content

Commit f940940

Browse files
authored
Merge pull request #454 from oiahoon/docs/complete-style-guide-links
2 parents 55de208 + 9c41b00 commit f940940

2 files changed

Lines changed: 17 additions & 5 deletions

File tree

STYLEGUIDE.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ remove_member(user, skip_membership_check: true)
478478
479479
* Use `snake_case` for methods and variables.
480480
<a name="snake-case-methods-vars"></a><sup>[[link](#snake-case-methods-vars)]</sup>
481-
* <a href="https://docs.rubocop.org/rubocop/cops_naming.html#namingsnakecase">RuboCop rule: Naming/SnakeCase</a>
481+
* <a href="https://docs.rubocop.org/rubocop/cops_naming.html#namingmethodname">RuboCop rule: Naming/MethodName</a>
482482
* <a href="https://docs.rubocop.org/rubocop/cops_naming.html#namingvariablename">RuboCop rule: Naming/VariableName</a>
483483
484484
* Use `CamelCase` for classes and modules. (Keep acronyms like HTTP,
@@ -493,7 +493,7 @@ remove_member(user, skip_membership_check: true)
493493
* The names of predicate methods (methods that return a boolean value)
494494
should end in a question mark. (i.e. `Array#empty?`).
495495
<a name="bool-methods-qmark"></a><sup>[[link](#bool-methods-qmark)]</sup>
496-
* <a href="https://docs.rubocop.org/rubocop/cops_naming.html#namingpredicatename">RuboCop rule: Naming/PredicateName</a>
496+
* <a href="https://docs.rubocop.org/rubocop/cops_naming.html#namingpredicateprefix">RuboCop rule: Naming/PredicatePrefix</a>
497497
498498
* The names of potentially "dangerous" methods (i.e. methods that modify `self` or the
499499
arguments, `exit!`, etc.) should end with an exclamation mark. Bang methods
@@ -718,7 +718,7 @@ end
718718
* Favor modifier `if/unless` usage when you have a single-line
719719
body.
720720
<a name="favor-modifier-if-unless"></a><sup>[[link](#favor-modifier-if-unless)]</sup>
721-
* <a href="https://docs.rubocop.org/rubocop/cops_style.html#stylemultilineternaryoperator">RuboCop rule: Style/MultilineTernaryOperator</a>
721+
* <a href="https://docs.rubocop.org/rubocop/cops_style.html#styleifunlessmodifier">RuboCop rule: Style/IfUnlessModifier</a>
722722

723723
``` ruby
724724
# bad
@@ -788,7 +788,7 @@ end
788788
trivial. However, do use the ternary operator(`?:`) over `if/then/else/end` constructs
789789
for single line conditionals.
790790
<a name="trivial-ternary"></a><sup>[[link](#trivial-ternary)]</sup>
791-
* <a href="https://docs.rubocop.org/rubocop/cops_style.html#stylemultilineternaryoperator">RuboCop rule: Style/MultilineTernaryOperator</a>
791+
* <a href="https://docs.rubocop.org/rubocop/cops_style.html#styleonelineconditional">RuboCop rule: Style/OneLineConditional</a>
792792

793793
``` ruby
794794
# bad
@@ -878,7 +878,7 @@ end
878878

879879
* Use spaces around the `=` operator when assigning default values to method parameters:
880880
<a name="spaces-around-equals"></a><sup>[[link](#spaces-around-equals)]</sup>
881-
* <a href="https://docs.rubocop.org/rubocop/cops_style.html#stylespacearoundequalsinparameterdefault">RuboCop rule: Style/SpaceAroundEqualsInParameterDefault</a>
881+
* <a href="https://docs.rubocop.org/rubocop/cops_layout.html#layoutspacearoundequalsinparameterdefault">RuboCop rule: Layout/SpaceAroundEqualsInParameterDefault</a>
882882

883883
``` ruby
884884
# bad

config/default.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,7 @@ Layout/SpaceAfterMethodName:
287287

288288
Layout/SpaceAfterNot:
289289
Enabled: true
290+
StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#no-spaces-bang
290291

291292
Layout/SpaceAfterSemicolon:
292293
StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#spaces-operators
@@ -311,6 +312,7 @@ Layout/SpaceAroundOperators:
311312

312313
Layout/SpaceBeforeBlockBraces:
313314
Enabled: true
315+
StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#spaces-operators
314316

315317
Layout/SpaceBeforeBrackets:
316318
Enabled: false
@@ -346,6 +348,7 @@ Layout/SpaceInsideHashLiteralBraces:
346348

347349
Layout/SpaceInsideParens:
348350
Enabled: true
351+
StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#no-spaces-braces
349352

350353
Layout/SpaceInsidePercentLiteralDelimiters:
351354
Enabled: false
@@ -355,6 +358,7 @@ Layout/SpaceInsideRangeLiteral:
355358

356359
Layout/SpaceInsideReferenceBrackets:
357360
Enabled: true
361+
StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#no-spaces-braces
358362

359363
Layout/SpaceInsideStringInterpolation:
360364
Enabled: false
@@ -825,12 +829,14 @@ Naming/MemoizedInstanceVariableName:
825829

826830
Naming/MethodName:
827831
Enabled: true
832+
StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#snake-case-methods-vars
828833

829834
Naming/MethodParameterName:
830835
Enabled: false
831836

832837
Naming/PredicatePrefix:
833838
Enabled: false
839+
StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#bool-methods-qmark
834840

835841
Naming/RescuedExceptionsVariableName:
836842
Enabled: false
@@ -1269,6 +1275,7 @@ Style/IfInsideElse:
12691275

12701276
Style/IfUnlessModifier:
12711277
Enabled: false
1278+
StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#favor-modifier-if-unless
12721279

12731280
Style/IfUnlessModifierOfIfUnless:
12741281
Enabled: false
@@ -1369,6 +1376,7 @@ Style/MultilineMethodSignature:
13691376

13701377
Style/MultilineTernaryOperator:
13711378
Enabled: false
1379+
StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#no-multiline-ternary
13721380

13731381
Style/MultilineWhenThen:
13741382
Enabled: false
@@ -1442,6 +1450,7 @@ Style/ObjectThen:
14421450

14431451
Style/OneLineConditional:
14441452
Enabled: true
1453+
StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#trivial-ternary
14451454

14461455
Style/OpenStructUse:
14471456
Enabled: false
@@ -1454,6 +1463,7 @@ Style/OptionalArguments:
14541463

14551464
Style/OptionalBooleanParameter:
14561465
Enabled: false
1466+
StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#keyword-arguments
14571467

14581468
Style/OrAssignment:
14591469
Enabled: true
@@ -1466,6 +1476,7 @@ Style/ParallelAssignment:
14661476

14671477
Style/ParenthesesAroundCondition:
14681478
Enabled: false
1479+
StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#no-parens-if-unless-while
14691480

14701481
Style/PercentLiteralDelimiters:
14711482
Enabled: false
@@ -1628,6 +1639,7 @@ Style/StringChars:
16281639

16291640
Style/StringConcatenation:
16301641
Enabled: false
1642+
StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#string-interpolation
16311643

16321644
Style/StringHashKeys:
16331645
Enabled: false

0 commit comments

Comments
 (0)