diff --git a/STYLEGUIDE.md b/STYLEGUIDE.md index 7c6d601c..4c7ed498 100644 --- a/STYLEGUIDE.md +++ b/STYLEGUIDE.md @@ -478,7 +478,7 @@ remove_member(user, skip_membership_check: true) * Use `snake_case` for methods and variables. [[link](#snake-case-methods-vars)] - * RuboCop rule: Naming/SnakeCase + * RuboCop rule: Naming/MethodName * RuboCop rule: Naming/VariableName * Use `CamelCase` for classes and modules. (Keep acronyms like HTTP, @@ -493,7 +493,7 @@ remove_member(user, skip_membership_check: true) * The names of predicate methods (methods that return a boolean value) should end in a question mark. (i.e. `Array#empty?`). [[link](#bool-methods-qmark)] - * RuboCop rule: Naming/PredicateName + * RuboCop rule: Naming/PredicatePrefix * The names of potentially "dangerous" methods (i.e. methods that modify `self` or the arguments, `exit!`, etc.) should end with an exclamation mark. Bang methods @@ -718,7 +718,7 @@ end * Favor modifier `if/unless` usage when you have a single-line body. [[link](#favor-modifier-if-unless)] - * RuboCop rule: Style/MultilineTernaryOperator + * RuboCop rule: Style/IfUnlessModifier ``` ruby # bad @@ -788,7 +788,7 @@ end trivial. However, do use the ternary operator(`?:`) over `if/then/else/end` constructs for single line conditionals. [[link](#trivial-ternary)] - * RuboCop rule: Style/MultilineTernaryOperator + * RuboCop rule: Style/OneLineConditional ``` ruby # bad @@ -878,7 +878,7 @@ end * Use spaces around the `=` operator when assigning default values to method parameters: [[link](#spaces-around-equals)] - * RuboCop rule: Style/SpaceAroundEqualsInParameterDefault + * RuboCop rule: Layout/SpaceAroundEqualsInParameterDefault ``` ruby # bad diff --git a/config/default.yml b/config/default.yml index 3e891b0a..4c36733a 100644 --- a/config/default.yml +++ b/config/default.yml @@ -287,6 +287,7 @@ Layout/SpaceAfterMethodName: Layout/SpaceAfterNot: Enabled: true + StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#no-spaces-bang Layout/SpaceAfterSemicolon: StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#spaces-operators @@ -311,6 +312,7 @@ Layout/SpaceAroundOperators: Layout/SpaceBeforeBlockBraces: Enabled: true + StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#spaces-operators Layout/SpaceBeforeBrackets: Enabled: false @@ -346,6 +348,7 @@ Layout/SpaceInsideHashLiteralBraces: Layout/SpaceInsideParens: Enabled: true + StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#no-spaces-braces Layout/SpaceInsidePercentLiteralDelimiters: Enabled: false @@ -355,6 +358,7 @@ Layout/SpaceInsideRangeLiteral: Layout/SpaceInsideReferenceBrackets: Enabled: true + StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#no-spaces-braces Layout/SpaceInsideStringInterpolation: Enabled: false @@ -825,12 +829,14 @@ Naming/MemoizedInstanceVariableName: Naming/MethodName: Enabled: true + StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#snake-case-methods-vars Naming/MethodParameterName: Enabled: false Naming/PredicatePrefix: Enabled: false + StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#bool-methods-qmark Naming/RescuedExceptionsVariableName: Enabled: false @@ -1269,6 +1275,7 @@ Style/IfInsideElse: Style/IfUnlessModifier: Enabled: false + StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#favor-modifier-if-unless Style/IfUnlessModifierOfIfUnless: Enabled: false @@ -1369,6 +1376,7 @@ Style/MultilineMethodSignature: Style/MultilineTernaryOperator: Enabled: false + StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#no-multiline-ternary Style/MultilineWhenThen: Enabled: false @@ -1442,6 +1450,7 @@ Style/ObjectThen: Style/OneLineConditional: Enabled: true + StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#trivial-ternary Style/OpenStructUse: Enabled: false @@ -1454,6 +1463,7 @@ Style/OptionalArguments: Style/OptionalBooleanParameter: Enabled: false + StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#keyword-arguments Style/OrAssignment: Enabled: true @@ -1466,6 +1476,7 @@ Style/ParallelAssignment: Style/ParenthesesAroundCondition: Enabled: false + StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#no-parens-if-unless-while Style/PercentLiteralDelimiters: Enabled: false @@ -1628,6 +1639,7 @@ Style/StringChars: Style/StringConcatenation: Enabled: false + StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#string-interpolation Style/StringHashKeys: Enabled: false