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

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