Skip to content

Commit 104d88e

Browse files
authored
Merge pull request #124 from github/match-styleguide-to-rubocop
config/default: Link some rules to their styleguide justifications
2 parents 6228895 + 596f143 commit 104d88e

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

config/default.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,10 @@ Layout/BlockAlignment:
6565
Layout/BlockEndNewline:
6666
Enabled: true
6767

68+
# TODO: Enable this since it's in the styleguide.
6869
Layout/CaseIndentation:
6970
Enabled: false
71+
StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#indent-when-as-start-of-case
7072

7173
Layout/ClassStructure:
7274
Enabled: false
@@ -186,10 +188,12 @@ Layout/IndentationStyle:
186188
Enabled: true
187189
EnforcedStyle: spaces
188190
IndentationWidth: 2
191+
StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#default-indentation
189192

190193
Layout/IndentationWidth:
191194
Enabled: true
192195
Width: 2
196+
StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#default-indentation
193197

194198
Layout/InitialIndentation:
195199
Enabled: true
@@ -259,9 +263,11 @@ Layout/SingleLineBlockChain:
259263

260264
Layout/SpaceAfterColon:
261265
Enabled: true
266+
StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#spaces-operators
262267

263268
Layout/SpaceAfterComma:
264269
Enabled: true
270+
StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#spaces-operators
265271

266272
Layout/SpaceAfterMethodName:
267273
Enabled: true
@@ -271,12 +277,14 @@ Layout/SpaceAfterNot:
271277

272278
Layout/SpaceAfterSemicolon:
273279
Enabled: true
280+
StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#spaces-operators
274281

275282
Layout/SpaceAroundBlockParameters:
276283
Enabled: true
277284

278285
Layout/SpaceAroundEqualsInParameterDefault:
279286
Enabled: true
287+
StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#spaces-around-equals
280288

281289
Layout/SpaceAroundKeyword:
282290
Enabled: false
@@ -311,6 +319,7 @@ Layout/SpaceInLambdaLiteral:
311319
Layout/SpaceInsideArrayLiteralBrackets:
312320
Enabled: true
313321
EnforcedStyle: no_space
322+
StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#no-spaces-braces
314323

315324
Layout/SpaceInsideArrayPercentLiteral:
316325
Enabled: true
@@ -341,6 +350,7 @@ Layout/TrailingEmptyLines:
341350

342351
Layout/TrailingWhitespace:
343352
Enabled: true
353+
StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#trailing-whitespace
344354

345355
Lint/AmbiguousAssignment:
346356
Enabled: false
@@ -678,8 +688,10 @@ Lint/UnreachableCode:
678688
Lint/UnreachableLoop:
679689
Enabled: false
680690

691+
# TODO: Enable this since it's in the styleguide.
681692
Lint/UnusedBlockArgument:
682693
Enabled: false
694+
StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#spaces-around-equals
683695

684696
Lint/UnusedMethodArgument:
685697
Enabled: false
@@ -976,8 +988,10 @@ Style/AccessorGrouping:
976988
Style/Alias:
977989
Enabled: false
978990

991+
# TODO: Enable this since it's in the styleguide.
979992
Style/AndOr:
980993
Enabled: false
994+
StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#no-and-or-or
981995

982996
Style/ArgumentsForwarding:
983997
Enabled: false
@@ -1077,6 +1091,7 @@ Style/DateTime:
10771091

10781092
Style/DefWithParentheses:
10791093
Enabled: true
1094+
StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#method-parens-when-arguments
10801095

10811096
Style/Dir:
10821097
Enabled: false
@@ -1164,6 +1179,7 @@ Style/FloatDivision:
11641179

11651180
Style/For:
11661181
Enabled: true
1182+
StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#avoid-for
11671183

11681184
Style/FormatString:
11691185
Enabled: false
@@ -1201,6 +1217,7 @@ Style/HashLikeCase:
12011217
Style/HashSyntax:
12021218
Enabled: true
12031219
EnforcedStyle: ruby19_no_mixed_keys
1220+
StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#symbols-as-keys
12041221

12051222
Style/HashTransformKeys:
12061223
Enabled: false
@@ -1300,6 +1317,7 @@ Style/MultilineIfModifier:
13001317

13011318
Style/MultilineIfThen:
13021319
Enabled: true
1320+
StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#no-then-for-multi-line-if-unless
13031321

13041322
Style/MultilineInPatternThen:
13051323
Enabled: false
@@ -1475,8 +1493,10 @@ Style/RedundantRegexpCharacterClass:
14751493
Style/RedundantRegexpEscape:
14761494
Enabled: false
14771495

1496+
# TODO: Enable this since it's in the styleguide.
14781497
Style/RedundantReturn:
14791498
Enabled: false
1499+
StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#avoid-return
14801500

14811501
Style/RedundantSelf:
14821502
Enabled: false
@@ -1626,8 +1646,10 @@ Style/TrailingUnderscoreVariable:
16261646
Style/TrivialAccessors:
16271647
Enabled: false
16281648

1649+
# TODO: Enable this since it's in the styleguide.
16291650
Style/UnlessElse:
16301651
Enabled: false
1652+
StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#no-else-with-unless
16311653

16321654
Style/UnlessLogicalOperators:
16331655
Enabled: false

0 commit comments

Comments
 (0)