.rubocop-https---shopify-github-io-ruby-style-guide-rubocop-yml 17 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027
  1. AllCops:
  2. Exclude:
  3. - 'db/schema.rb'
  4. DisabledByDefault: true
  5. StyleGuideBaseURL: https://shopify.github.io/ruby-style-guide/
  6. Lint/AssignmentInCondition:
  7. Enabled: true
  8. Layout/AccessModifierIndentation:
  9. EnforcedStyle: indent
  10. SupportedStyles:
  11. - outdent
  12. - indent
  13. IndentationWidth:
  14. Style/Alias:
  15. EnforcedStyle: prefer_alias_method
  16. SupportedStyles:
  17. - prefer_alias
  18. - prefer_alias_method
  19. Layout/AlignHash:
  20. EnforcedHashRocketStyle: key
  21. EnforcedColonStyle: key
  22. EnforcedLastArgumentHashStyle: ignore_implicit
  23. SupportedLastArgumentHashStyles:
  24. - always_inspect
  25. - always_ignore
  26. - ignore_implicit
  27. - ignore_explicit
  28. Layout/AlignParameters:
  29. EnforcedStyle: with_fixed_indentation
  30. SupportedStyles:
  31. - with_first_parameter
  32. - with_fixed_indentation
  33. IndentationWidth:
  34. Style/AndOr:
  35. EnforcedStyle: always
  36. SupportedStyles:
  37. - always
  38. - conditionals
  39. Style/BarePercentLiterals:
  40. EnforcedStyle: bare_percent
  41. SupportedStyles:
  42. - percent_q
  43. - bare_percent
  44. Style/BlockDelimiters:
  45. EnforcedStyle: line_count_based
  46. SupportedStyles:
  47. - line_count_based
  48. - semantic
  49. - braces_for_chaining
  50. ProceduralMethods:
  51. - benchmark
  52. - bm
  53. - bmbm
  54. - create
  55. - each_with_object
  56. - measure
  57. - new
  58. - realtime
  59. - tap
  60. - with_object
  61. FunctionalMethods:
  62. - let
  63. - let!
  64. - subject
  65. - watch
  66. IgnoredMethods:
  67. - lambda
  68. - proc
  69. - it
  70. Style/BracesAroundHashParameters:
  71. EnforcedStyle: no_braces
  72. SupportedStyles:
  73. - braces
  74. - no_braces
  75. - context_dependent
  76. Layout/CaseIndentation:
  77. EnforcedStyle: end
  78. SupportedStyles:
  79. - case
  80. - end
  81. IndentOneStep: false
  82. IndentationWidth:
  83. Style/ClassAndModuleChildren:
  84. EnforcedStyle: nested
  85. SupportedStyles:
  86. - nested
  87. - compact
  88. Style/ClassCheck:
  89. EnforcedStyle: is_a?
  90. SupportedStyles:
  91. - is_a?
  92. - kind_of?
  93. Style/CommandLiteral:
  94. EnforcedStyle: percent_x
  95. SupportedStyles:
  96. - backticks
  97. - percent_x
  98. - mixed
  99. AllowInnerBackticks: false
  100. Style/CommentAnnotation:
  101. Keywords:
  102. - TODO
  103. - FIXME
  104. - OPTIMIZE
  105. - HACK
  106. - REVIEW
  107. Style/ConditionalAssignment:
  108. EnforcedStyle: assign_to_condition
  109. SupportedStyles:
  110. - assign_to_condition
  111. - assign_inside_condition
  112. SingleLineConditionsOnly: true
  113. Layout/DotPosition:
  114. EnforcedStyle: leading
  115. SupportedStyles:
  116. - leading
  117. - trailing
  118. Style/EmptyElse:
  119. EnforcedStyle: both
  120. SupportedStyles:
  121. - empty
  122. - nil
  123. - both
  124. Layout/EmptyLineBetweenDefs:
  125. AllowAdjacentOneLineDefs: false
  126. Layout/EmptyLinesAroundBlockBody:
  127. EnforcedStyle: no_empty_lines
  128. SupportedStyles:
  129. - empty_lines
  130. - no_empty_lines
  131. Layout/EmptyLinesAroundClassBody:
  132. EnforcedStyle: no_empty_lines
  133. SupportedStyles:
  134. - empty_lines
  135. - empty_lines_except_namespace
  136. - no_empty_lines
  137. Layout/EmptyLinesAroundModuleBody:
  138. EnforcedStyle: no_empty_lines
  139. SupportedStyles:
  140. - empty_lines
  141. - empty_lines_except_namespace
  142. - no_empty_lines
  143. Layout/ExtraSpacing:
  144. AllowForAlignment: true
  145. ForceEqualSignAlignment: false
  146. Naming/FileName:
  147. Exclude: []
  148. ExpectMatchingDefinition: false
  149. Regex:
  150. IgnoreExecutableScripts: true
  151. Layout/IndentFirstArgument:
  152. EnforcedStyle: consistent
  153. SupportedStyles:
  154. - consistent
  155. - special_for_inner_method_call
  156. - special_for_inner_method_call_in_parentheses
  157. IndentationWidth:
  158. Style/For:
  159. EnforcedStyle: each
  160. SupportedStyles:
  161. - for
  162. - each
  163. Style/FormatString:
  164. EnforcedStyle: format
  165. SupportedStyles:
  166. - format
  167. - sprintf
  168. - percent
  169. Style/FrozenStringLiteralComment:
  170. Details: >-
  171. Add `# frozen_string_literal: true` to the top of the file. Frozen string
  172. literals will become the default in a future Ruby version, and we want to
  173. make sure we're ready.
  174. EnforcedStyle: always
  175. SupportedStyles:
  176. - always
  177. - never
  178. Style/GlobalVars:
  179. AllowedVariables: []
  180. Style/HashSyntax:
  181. EnforcedStyle: ruby19
  182. SupportedStyles:
  183. - ruby19
  184. - hash_rockets
  185. - no_mixed_keys
  186. - ruby19_no_mixed_keys
  187. UseHashRocketsWithSymbolValues: false
  188. PreferHashRocketsForNonAlnumEndingSymbols: false
  189. Layout/IndentationConsistency:
  190. EnforcedStyle: normal
  191. SupportedStyles:
  192. - normal
  193. - rails
  194. Layout/IndentationWidth:
  195. Width: 2
  196. Layout/IndentFirstArrayElement:
  197. EnforcedStyle: consistent
  198. SupportedStyles:
  199. - special_inside_parentheses
  200. - consistent
  201. - align_brackets
  202. IndentationWidth:
  203. Layout/IndentAssignment:
  204. IndentationWidth:
  205. Layout/IndentFirstHashElement:
  206. EnforcedStyle: consistent
  207. SupportedStyles:
  208. - special_inside_parentheses
  209. - consistent
  210. - align_braces
  211. IndentationWidth:
  212. Style/LambdaCall:
  213. EnforcedStyle: call
  214. SupportedStyles:
  215. - call
  216. - braces
  217. Style/Next:
  218. EnforcedStyle: skip_modifier_ifs
  219. MinBodyLength: 3
  220. SupportedStyles:
  221. - skip_modifier_ifs
  222. - always
  223. Style/NonNilCheck:
  224. IncludeSemanticChanges: false
  225. Style/MethodCallWithArgsParentheses:
  226. Enabled: true
  227. IgnoreMacros: true
  228. IgnoredMethods:
  229. - require
  230. - require_relative
  231. - require_dependency
  232. - yield
  233. - raise
  234. - puts
  235. Exclude:
  236. - Gemfile
  237. Style/MethodDefParentheses:
  238. EnforcedStyle: require_parentheses
  239. SupportedStyles:
  240. - require_parentheses
  241. - require_no_parentheses
  242. - require_no_parentheses_except_multiline
  243. Naming/MethodName:
  244. EnforcedStyle: snake_case
  245. SupportedStyles:
  246. - snake_case
  247. - camelCase
  248. Layout/MultilineArrayBraceLayout:
  249. EnforcedStyle: symmetrical
  250. SupportedStyles:
  251. - symmetrical
  252. - new_line
  253. - same_line
  254. Layout/MultilineHashBraceLayout:
  255. EnforcedStyle: symmetrical
  256. SupportedStyles:
  257. - symmetrical
  258. - new_line
  259. - same_line
  260. Layout/MultilineMethodCallBraceLayout:
  261. EnforcedStyle: symmetrical
  262. SupportedStyles:
  263. - symmetrical
  264. - new_line
  265. - same_line
  266. Layout/MultilineMethodCallIndentation:
  267. EnforcedStyle: indented
  268. SupportedStyles:
  269. - aligned
  270. - indented
  271. - indented_relative_to_receiver
  272. IndentationWidth: 2
  273. Layout/MultilineMethodDefinitionBraceLayout:
  274. EnforcedStyle: symmetrical
  275. SupportedStyles:
  276. - symmetrical
  277. - new_line
  278. - same_line
  279. Style/NumericLiteralPrefix:
  280. EnforcedOctalStyle: zero_only
  281. SupportedOctalStyles:
  282. - zero_with_o
  283. - zero_only
  284. Style/ParenthesesAroundCondition:
  285. AllowSafeAssignment: true
  286. Style/PercentQLiterals:
  287. EnforcedStyle: lower_case_q
  288. SupportedStyles:
  289. - lower_case_q
  290. - upper_case_q
  291. Naming/PredicateName:
  292. NamePrefix:
  293. - is_
  294. NamePrefixBlacklist:
  295. - is_
  296. NameWhitelist:
  297. - is_a?
  298. Exclude:
  299. - 'spec/**/*'
  300. Style/PreferredHashMethods:
  301. EnforcedStyle: short
  302. SupportedStyles:
  303. - short
  304. - verbose
  305. Style/RaiseArgs:
  306. EnforcedStyle: exploded
  307. SupportedStyles:
  308. - compact
  309. - exploded
  310. Style/RedundantReturn:
  311. AllowMultipleReturnValues: false
  312. Style/RegexpLiteral:
  313. EnforcedStyle: mixed
  314. SupportedStyles:
  315. - slashes
  316. - percent_r
  317. - mixed
  318. AllowInnerSlashes: false
  319. Style/SafeNavigation:
  320. ConvertCodeThatCanStartToReturnNil: false
  321. Enabled: true
  322. Lint/SafeNavigationChain:
  323. Enabled: true
  324. Style/Semicolon:
  325. AllowAsExpressionSeparator: false
  326. Style/SignalException:
  327. EnforcedStyle: only_raise
  328. SupportedStyles:
  329. - only_raise
  330. - only_fail
  331. - semantic
  332. Style/SingleLineMethods:
  333. AllowIfMethodIsEmpty: true
  334. Layout/SpaceBeforeFirstArg:
  335. AllowForAlignment: true
  336. Style/SpecialGlobalVars:
  337. EnforcedStyle: use_english_names
  338. SupportedStyles:
  339. - use_perl_names
  340. - use_english_names
  341. Style/StabbyLambdaParentheses:
  342. EnforcedStyle: require_parentheses
  343. SupportedStyles:
  344. - require_parentheses
  345. - require_no_parentheses
  346. Style/StringLiteralsInInterpolation:
  347. EnforcedStyle: single_quotes
  348. SupportedStyles:
  349. - single_quotes
  350. - double_quotes
  351. Layout/SpaceAroundBlockParameters:
  352. EnforcedStyleInsidePipes: no_space
  353. SupportedStylesInsidePipes:
  354. - space
  355. - no_space
  356. Layout/SpaceAroundEqualsInParameterDefault:
  357. EnforcedStyle: space
  358. SupportedStyles:
  359. - space
  360. - no_space
  361. Layout/SpaceAroundOperators:
  362. AllowForAlignment: true
  363. Layout/SpaceBeforeBlockBraces:
  364. EnforcedStyle: space
  365. EnforcedStyleForEmptyBraces: space
  366. SupportedStyles:
  367. - space
  368. - no_space
  369. Layout/SpaceInsideBlockBraces:
  370. EnforcedStyle: space
  371. SupportedStyles:
  372. - space
  373. - no_space
  374. EnforcedStyleForEmptyBraces: no_space
  375. SpaceBeforeBlockParameters: true
  376. Layout/SpaceInsideHashLiteralBraces:
  377. EnforcedStyle: space
  378. EnforcedStyleForEmptyBraces: no_space
  379. SupportedStyles:
  380. - space
  381. - no_space
  382. - compact
  383. Layout/SpaceInsideStringInterpolation:
  384. EnforcedStyle: no_space
  385. SupportedStyles:
  386. - space
  387. - no_space
  388. Style/SymbolProc:
  389. IgnoredMethods:
  390. - respond_to
  391. - define_method
  392. Style/TernaryParentheses:
  393. EnforcedStyle: require_no_parentheses
  394. SupportedStyles:
  395. - require_parentheses
  396. - require_no_parentheses
  397. AllowSafeAssignment: true
  398. Layout/TrailingBlankLines:
  399. EnforcedStyle: final_newline
  400. SupportedStyles:
  401. - final_newline
  402. - final_blank_line
  403. Style/TrivialAccessors:
  404. ExactNameMatch: true
  405. AllowPredicates: true
  406. AllowDSLWriters: false
  407. IgnoreClassMethods: false
  408. Whitelist:
  409. - to_ary
  410. - to_a
  411. - to_c
  412. - to_enum
  413. - to_h
  414. - to_hash
  415. - to_i
  416. - to_int
  417. - to_io
  418. - to_open
  419. - to_path
  420. - to_proc
  421. - to_r
  422. - to_regexp
  423. - to_str
  424. - to_s
  425. - to_sym
  426. Naming/VariableName:
  427. EnforcedStyle: snake_case
  428. SupportedStyles:
  429. - snake_case
  430. - camelCase
  431. Style/WhileUntilModifier:
  432. Enabled: true
  433. Metrics/BlockNesting:
  434. Max: 3
  435. Metrics/LineLength:
  436. Max: 120
  437. AllowHeredoc: true
  438. AllowURI: true
  439. URISchemes:
  440. - http
  441. - https
  442. IgnoreCopDirectives: false
  443. IgnoredPatterns:
  444. - '\A\s*(remote_)?test(_\w+)?\s.*(do|->)(\s|\Z)'
  445. Metrics/ParameterLists:
  446. Max: 5
  447. CountKeywordArgs: false
  448. Layout/BlockAlignment:
  449. EnforcedStyleAlignWith: either
  450. SupportedStylesAlignWith:
  451. - either
  452. - start_of_block
  453. - start_of_line
  454. Layout/EndAlignment:
  455. EnforcedStyleAlignWith: variable
  456. SupportedStylesAlignWith:
  457. - keyword
  458. - variable
  459. - start_of_line
  460. Layout/DefEndAlignment:
  461. EnforcedStyleAlignWith: start_of_line
  462. SupportedStylesAlignWith:
  463. - start_of_line
  464. - def
  465. Lint/InheritException:
  466. EnforcedStyle: runtime_error
  467. SupportedStyles:
  468. - runtime_error
  469. - standard_error
  470. Lint/UnusedBlockArgument:
  471. IgnoreEmptyBlocks: true
  472. AllowUnusedKeywordArguments: false
  473. Lint/UnusedMethodArgument:
  474. AllowUnusedKeywordArguments: false
  475. IgnoreEmptyMethods: true
  476. Naming/AccessorMethodName:
  477. Enabled: true
  478. Layout/AlignArray:
  479. Enabled: true
  480. Style/ArrayJoin:
  481. Enabled: true
  482. Naming/AsciiIdentifiers:
  483. Enabled: true
  484. Style/Attr:
  485. Enabled: true
  486. Style/BeginBlock:
  487. Enabled: true
  488. Style/BlockComments:
  489. Enabled: true
  490. Layout/BlockEndNewline:
  491. Enabled: true
  492. Style/CaseEquality:
  493. Enabled: true
  494. Style/CharacterLiteral:
  495. Enabled: true
  496. Naming/ClassAndModuleCamelCase:
  497. Enabled: true
  498. Style/ClassMethods:
  499. Enabled: true
  500. Style/ClassVars:
  501. Enabled: true
  502. Layout/ClosingParenthesisIndentation:
  503. Enabled: true
  504. Style/ColonMethodCall:
  505. Enabled: true
  506. Layout/CommentIndentation:
  507. Enabled: true
  508. Naming/ConstantName:
  509. Enabled: true
  510. Style/DateTime:
  511. Enabled: true
  512. Style/DefWithParentheses:
  513. Enabled: true
  514. Style/EachForSimpleLoop:
  515. Enabled: true
  516. Style/EachWithObject:
  517. Enabled: true
  518. Layout/ElseAlignment:
  519. Enabled: true
  520. Style/EmptyCaseCondition:
  521. Enabled: true
  522. Layout/EmptyLines:
  523. Enabled: true
  524. Layout/EmptyLinesAroundAccessModifier:
  525. Enabled: true
  526. Layout/EmptyLinesAroundMethodBody:
  527. Enabled: true
  528. Style/EmptyLiteral:
  529. Enabled: true
  530. Style/EndBlock:
  531. Enabled: true
  532. Layout/EndOfLine:
  533. Enabled: true
  534. Style/EvenOdd:
  535. Enabled: true
  536. Layout/InitialIndentation:
  537. Enabled: true
  538. Lint/FlipFlop:
  539. Enabled: true
  540. Style/IfInsideElse:
  541. Enabled: true
  542. Style/IfUnlessModifierOfIfUnless:
  543. Enabled: true
  544. Style/IfWithSemicolon:
  545. Enabled: true
  546. Style/IdenticalConditionalBranches:
  547. Enabled: true
  548. Style/InfiniteLoop:
  549. Enabled: true
  550. Layout/LeadingCommentSpace:
  551. Enabled: true
  552. Style/LineEndConcatenation:
  553. Enabled: true
  554. Style/MethodCallWithoutArgsParentheses:
  555. Enabled: true
  556. Style/MethodMissingSuper:
  557. Enabled: true
  558. Style/MissingRespondToMissing:
  559. Enabled: true
  560. Layout/MultilineBlockLayout:
  561. Enabled: true
  562. Style/MultilineIfThen:
  563. Enabled: true
  564. Style/MultilineMemoization:
  565. Enabled: true
  566. Style/MultilineTernaryOperator:
  567. Enabled: true
  568. Style/NegatedIf:
  569. Enabled: true
  570. Style/NegatedWhile:
  571. Enabled: true
  572. Style/NestedModifier:
  573. Enabled: true
  574. Style/NestedParenthesizedCalls:
  575. Enabled: true
  576. Style/NestedTernaryOperator:
  577. Enabled: true
  578. Style/NilComparison:
  579. Enabled: true
  580. Style/Not:
  581. Enabled: true
  582. Style/OneLineConditional:
  583. Enabled: true
  584. Naming/BinaryOperatorParameterName:
  585. Enabled: true
  586. Style/OptionalArguments:
  587. Enabled: true
  588. Style/ParallelAssignment:
  589. Enabled: true
  590. Style/PerlBackrefs:
  591. Enabled: true
  592. Style/Proc:
  593. Enabled: true
  594. Style/RedundantBegin:
  595. Enabled: true
  596. Style/RedundantException:
  597. Enabled: true
  598. Style/RedundantFreeze:
  599. Enabled: true
  600. Style/RedundantParentheses:
  601. Enabled: true
  602. Style/RedundantSelf:
  603. Enabled: true
  604. Style/RedundantSortBy:
  605. Enabled: true
  606. Layout/RescueEnsureAlignment:
  607. Enabled: true
  608. Style/RescueModifier:
  609. Enabled: true
  610. Style/Sample:
  611. Enabled: true
  612. Style/SelfAssignment:
  613. Enabled: true
  614. Layout/SpaceAfterColon:
  615. Enabled: true
  616. Layout/SpaceAfterComma:
  617. Enabled: true
  618. Layout/SpaceAfterMethodName:
  619. Enabled: true
  620. Layout/SpaceAfterNot:
  621. Enabled: true
  622. Layout/SpaceAfterSemicolon:
  623. Enabled: true
  624. Layout/SpaceBeforeComma:
  625. Enabled: true
  626. Layout/SpaceBeforeComment:
  627. Enabled: true
  628. Layout/SpaceBeforeSemicolon:
  629. Enabled: true
  630. Layout/SpaceAroundKeyword:
  631. Enabled: true
  632. Layout/SpaceInsideArrayPercentLiteral:
  633. Enabled: true
  634. Layout/SpaceInsidePercentLiteralDelimiters:
  635. Enabled: true
  636. Layout/SpaceInsideArrayLiteralBrackets:
  637. Enabled: true
  638. Layout/SpaceInsideParens:
  639. Enabled: true
  640. Layout/SpaceInsideRangeLiteral:
  641. Enabled: true
  642. Style/SymbolLiteral:
  643. Enabled: true
  644. Layout/Tab:
  645. Enabled: true
  646. Layout/TrailingWhitespace:
  647. Enabled: true
  648. Style/UnlessElse:
  649. Enabled: true
  650. Style/UnneededCapitalW:
  651. Enabled: true
  652. Style/UnneededInterpolation:
  653. Enabled: true
  654. Style/UnneededPercentQ:
  655. Enabled: true
  656. Style/VariableInterpolation:
  657. Enabled: true
  658. Style/WhenThen:
  659. Enabled: true
  660. Style/WhileUntilDo:
  661. Enabled: true
  662. Style/ZeroLengthPredicate:
  663. Enabled: true
  664. Layout/IndentHeredoc:
  665. EnforcedStyle: squiggly
  666. Lint/AmbiguousOperator:
  667. Enabled: true
  668. Lint/AmbiguousRegexpLiteral:
  669. Enabled: true
  670. Lint/CircularArgumentReference:
  671. Enabled: true
  672. Layout/ConditionPosition:
  673. Enabled: true
  674. Lint/Debugger:
  675. Enabled: true
  676. Lint/DeprecatedClassMethods:
  677. Enabled: true
  678. Lint/DuplicateMethods:
  679. Enabled: true
  680. Lint/DuplicatedKey:
  681. Enabled: true
  682. Lint/EachWithObjectArgument:
  683. Enabled: true
  684. Lint/ElseLayout:
  685. Enabled: true
  686. Lint/EmptyEnsure:
  687. Enabled: true
  688. Lint/EmptyInterpolation:
  689. Enabled: true
  690. Lint/EndInMethod:
  691. Enabled: true
  692. Lint/EnsureReturn:
  693. Enabled: true
  694. Lint/FloatOutOfRange:
  695. Enabled: true
  696. Lint/FormatParameterMismatch:
  697. Enabled: true
  698. Lint/HandleExceptions:
  699. Enabled: true
  700. Lint/ImplicitStringConcatenation:
  701. Description: Checks for adjacent string literals on the same line, which could
  702. better be represented as a single string literal.
  703. Lint/IneffectiveAccessModifier:
  704. Description: Checks for attempts to use `private` or `protected` to set the visibility
  705. of a class method, which does not work.
  706. Lint/LiteralAsCondition:
  707. Enabled: true
  708. Lint/LiteralInInterpolation:
  709. Enabled: true
  710. Lint/Loop:
  711. Description: Use Kernel#loop with break rather than begin/end/until or begin/end/while
  712. for post-loop tests.
  713. Lint/NestedMethodDefinition:
  714. Enabled: true
  715. Lint/NextWithoutAccumulator:
  716. Description: Do not omit the accumulator when calling `next` in a `reduce`/`inject`
  717. block.
  718. Lint/NonLocalExitFromIterator:
  719. Enabled: true
  720. Lint/ParenthesesAsGroupedExpression:
  721. Enabled: true
  722. Lint/PercentStringArray:
  723. Enabled: true
  724. Lint/PercentSymbolArray:
  725. Enabled: true
  726. Lint/RandOne:
  727. Description: Checks for `rand(1)` calls. Such calls always return `0` and most
  728. likely a mistake.
  729. Lint/RequireParentheses:
  730. Enabled: true
  731. Lint/RescueException:
  732. Enabled: true
  733. Lint/ShadowedException:
  734. Enabled: true
  735. Lint/ShadowingOuterLocalVariable:
  736. Enabled: true
  737. Lint/StringConversionInInterpolation:
  738. Enabled: true
  739. Lint/UnderscorePrefixedVariableName:
  740. Enabled: true
  741. Lint/UnifiedInteger:
  742. Enabled: true
  743. Lint/UnneededCopDisableDirective:
  744. Enabled: true
  745. Lint/UnneededCopEnableDirective:
  746. Enabled: true
  747. Lint/UnneededSplatExpansion:
  748. Enabled: true
  749. Lint/UnreachableCode:
  750. Enabled: true
  751. Lint/UselessAccessModifier:
  752. ContextCreatingMethods: []
  753. Lint/UselessAssignment:
  754. Enabled: true
  755. Lint/UselessComparison:
  756. Enabled: true
  757. Lint/UselessElseWithoutRescue:
  758. Enabled: true
  759. Lint/UselessSetterCall:
  760. Enabled: true
  761. Lint/Void:
  762. Enabled: true
  763. Security/Eval:
  764. Enabled: true
  765. Security/JSONLoad:
  766. Enabled: true
  767. Security/Open:
  768. Enabled: true
  769. Lint/BigDecimalNew:
  770. Enabled: true
  771. Style/Strip:
  772. Enabled: true
  773. Style/TrailingBodyOnClass:
  774. Enabled: true
  775. Style/TrailingBodyOnModule:
  776. Enabled: true
  777. Style/TrailingCommaInArrayLiteral:
  778. EnforcedStyleForMultiline: comma
  779. Enabled: true
  780. Style/TrailingCommaInHashLiteral:
  781. EnforcedStyleForMultiline: comma
  782. Enabled: true
  783. Layout/SpaceInsideReferenceBrackets:
  784. EnforcedStyle: no_space
  785. EnforcedStyleForEmptyBrackets: no_space
  786. Enabled: true
  787. Style/ModuleFunction:
  788. EnforcedStyle: extend_self
  789. Lint/OrderedMagicComments:
  790. Enabled: true