You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

1157 lines
37 KiB

  1. AllCops:
  2. DisabledByDefault: true
  3. #################### Lint ################################
  4. Lint/AmbiguousOperator:
  5. Description: >-
  6. Checks for ambiguous operators in the first argument of a
  7. method invocation without parentheses.
  8. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-as-args'
  9. Enabled: true
  10. Lint/AmbiguousRegexpLiteral:
  11. Description: >-
  12. Checks for ambiguous regexp literals in the first argument of
  13. a method invocation without parenthesis.
  14. Enabled: true
  15. Lint/AssignmentInCondition:
  16. Description: "Don't use assignment in conditions."
  17. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition'
  18. Enabled: true
  19. Lint/BlockAlignment:
  20. Description: 'Align block ends correctly.'
  21. Enabled: true
  22. Lint/CircularArgumentReference:
  23. Description: "Don't refer to the keyword argument in the default value."
  24. Enabled: true
  25. Lint/ConditionPosition:
  26. Description: >-
  27. Checks for condition placed in a confusing position relative to
  28. the keyword.
  29. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#same-line-condition'
  30. Enabled: true
  31. Lint/Debugger:
  32. Description: 'Check for debugger calls.'
  33. Enabled: true
  34. Lint/DefEndAlignment:
  35. Description: 'Align ends corresponding to defs correctly.'
  36. Enabled: true
  37. Lint/DeprecatedClassMethods:
  38. Description: 'Check for deprecated class method calls.'
  39. Enabled: true
  40. Lint/DuplicateMethods:
  41. Description: 'Check for duplicate methods calls.'
  42. Enabled: true
  43. Lint/EachWithObjectArgument:
  44. Description: 'Check for immutable argument given to each_with_object.'
  45. Enabled: true
  46. Lint/ElseLayout:
  47. Description: 'Check for odd code arrangement in an else block.'
  48. Enabled: true
  49. Lint/EmptyEnsure:
  50. Description: 'Checks for empty ensure block.'
  51. Enabled: true
  52. Lint/EmptyInterpolation:
  53. Description: 'Checks for empty string interpolation.'
  54. Enabled: true
  55. Lint/EndAlignment:
  56. Description: 'Align ends correctly.'
  57. Enabled: true
  58. Lint/EndInMethod:
  59. Description: 'END blocks should not be placed inside method definitions.'
  60. Enabled: true
  61. Lint/EnsureReturn:
  62. Description: 'Do not use return in an ensure block.'
  63. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-return-ensure'
  64. Enabled: true
  65. Lint/Eval:
  66. Description: 'The use of eval represents a serious security risk.'
  67. Enabled: true
  68. Lint/FormatParameterMismatch:
  69. Description: 'The number of parameters to format/sprint must match the fields.'
  70. Enabled: true
  71. Lint/HandleExceptions:
  72. Description: "Don't suppress exception."
  73. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions'
  74. Enabled: true
  75. Lint/InvalidCharacterLiteral:
  76. Description: >-
  77. Checks for invalid character literals with a non-escaped
  78. whitespace character.
  79. Enabled: true
  80. Lint/LiteralInCondition:
  81. Description: 'Checks of literals used in conditions.'
  82. Enabled: true
  83. Lint/LiteralInInterpolation:
  84. Description: 'Checks for literals used in interpolation.'
  85. Enabled: true
  86. Lint/Loop:
  87. Description: >-
  88. Use Kernel#loop with break rather than begin/end/until or
  89. begin/end/while for post-loop tests.
  90. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#loop-with-break'
  91. Enabled: true
  92. Lint/NestedMethodDefinition:
  93. Description: 'Do not use nested method definitions.'
  94. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-methods'
  95. Enabled: true
  96. Lint/NonLocalExitFromIterator:
  97. Description: 'Do not use return in iterator to cause non-local exit.'
  98. Enabled: true
  99. Lint/ParenthesesAsGroupedExpression:
  100. Description: >-
  101. Checks for method calls with a space before the opening
  102. parenthesis.
  103. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-no-spaces'
  104. Enabled: true
  105. Lint/RequireParentheses:
  106. Description: >-
  107. Use parentheses in the method call to avoid confusion
  108. about precedence.
  109. Enabled: true
  110. Lint/RescueException:
  111. Description: 'Avoid rescuing the Exception class.'
  112. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-blind-rescues'
  113. Enabled: true
  114. Lint/ShadowingOuterLocalVariable:
  115. Description: >-
  116. Do not use the same name as outer local variable
  117. for block arguments or block local variables.
  118. Enabled: true
  119. Lint/StringConversionInInterpolation:
  120. Description: 'Checks for Object#to_s usage in string interpolation.'
  121. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-to-s'
  122. Enabled: true
  123. Lint/UnderscorePrefixedVariableName:
  124. Description: 'Do not use prefix `_` for a variable that is used.'
  125. Enabled: true
  126. Lint/UnneededDisable:
  127. Description: >-
  128. Checks for rubocop:disable comments that can be removed.
  129. Note: this cop is not disabled when disabling all cops.
  130. It must be explicitly disabled.
  131. Enabled: true
  132. Lint/UnusedBlockArgument:
  133. Description: 'Checks for unused block arguments.'
  134. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
  135. Enabled: true
  136. Lint/UnusedMethodArgument:
  137. Description: 'Checks for unused method arguments.'
  138. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
  139. Enabled: true
  140. Lint/UnreachableCode:
  141. Description: 'Unreachable code.'
  142. Enabled: true
  143. Lint/UselessAccessModifier:
  144. Description: 'Checks for useless access modifiers.'
  145. Enabled: true
  146. Lint/UselessAssignment:
  147. Description: 'Checks for useless assignment to a local variable.'
  148. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
  149. Enabled: true
  150. Lint/UselessComparison:
  151. Description: 'Checks for comparison of something with itself.'
  152. Enabled: true
  153. Lint/UselessElseWithoutRescue:
  154. Description: 'Checks for useless `else` in `begin..end` without `rescue`.'
  155. Enabled: true
  156. Lint/UselessSetterCall:
  157. Description: 'Checks for useless setter call to a local variable.'
  158. Enabled: true
  159. Lint/Void:
  160. Description: 'Possible use of operator/literal/variable in void context.'
  161. Enabled: true
  162. ###################### Metrics ####################################
  163. Metrics/AbcSize:
  164. Description: >-
  165. A calculated magnitude based on number of assignments,
  166. branches, and conditions.
  167. Reference: 'http://c2.com/cgi/wiki?AbcMetric'
  168. Enabled: false
  169. Max: 20
  170. Metrics/BlockNesting:
  171. Description: 'Avoid excessive block nesting'
  172. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#three-is-the-number-thou-shalt-count'
  173. Enabled: true
  174. Max: 4
  175. Metrics/ClassLength:
  176. Description: 'Avoid classes longer than 250 lines of code.'
  177. Enabled: true
  178. Max: 250
  179. Metrics/CyclomaticComplexity:
  180. Description: >-
  181. A complexity metric that is strongly correlated to the number
  182. of test cases needed to validate a method.
  183. Enabled: true
  184. Metrics/LineLength:
  185. Description: 'Limit lines to 80 characters.'
  186. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#80-character-limits'
  187. Enabled: false
  188. Metrics/MethodLength:
  189. Description: 'Avoid methods longer than 30 lines of code.'
  190. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#short-methods'
  191. Enabled: true
  192. Max: 30
  193. Metrics/ModuleLength:
  194. Description: 'Avoid modules longer than 250 lines of code.'
  195. Enabled: true
  196. Max: 250
  197. Metrics/ParameterLists:
  198. Description: 'Avoid parameter lists longer than three or four parameters.'
  199. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#too-many-params'
  200. Enabled: true
  201. Metrics/PerceivedComplexity:
  202. Description: >-
  203. A complexity metric geared towards measuring complexity for a
  204. human reader.
  205. Enabled: false
  206. ##################### Performance #############################
  207. Performance/Count:
  208. Description: >-
  209. Use `count` instead of `select...size`, `reject...size`,
  210. `select...count`, `reject...count`, `select...length`,
  211. and `reject...length`.
  212. Enabled: true
  213. Performance/Detect:
  214. Description: >-
  215. Use `detect` instead of `select.first`, `find_all.first`,
  216. `select.last`, and `find_all.last`.
  217. Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerabledetect-vs-enumerableselectfirst-code'
  218. Enabled: true
  219. Performance/FlatMap:
  220. Description: >-
  221. Use `Enumerable#flat_map`
  222. instead of `Enumerable#map...Array#flatten(1)`
  223. or `Enumberable#collect..Array#flatten(1)`
  224. Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerablemaparrayflatten-vs-enumerableflat_map-code'
  225. Enabled: true
  226. EnabledForFlattenWithoutParams: false
  227. # If enabled, this cop will warn about usages of
  228. # `flatten` being called without any parameters.
  229. # This can be dangerous since `flat_map` will only flatten 1 level, and
  230. # `flatten` without any parameters can flatten multiple levels.
  231. Performance/ReverseEach:
  232. Description: 'Use `reverse_each` instead of `reverse.each`.'
  233. Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerablereverseeach-vs-enumerablereverse_each-code'
  234. Enabled: true
  235. Performance/Sample:
  236. Description: >-
  237. Use `sample` instead of `shuffle.first`,
  238. `shuffle.last`, and `shuffle[Fixnum]`.
  239. Reference: 'https://github.com/JuanitoFatas/fast-ruby#arrayshufflefirst-vs-arraysample-code'
  240. Enabled: true
  241. Performance/Size:
  242. Description: >-
  243. Use `size` instead of `count` for counting
  244. the number of elements in `Array` and `Hash`.
  245. Reference: 'https://github.com/JuanitoFatas/fast-ruby#arraycount-vs-arraysize-code'
  246. Enabled: true
  247. Performance/StringReplacement:
  248. Description: >-
  249. Use `tr` instead of `gsub` when you are replacing the same
  250. number of characters. Use `delete` instead of `gsub` when
  251. you are deleting characters.
  252. Reference: 'https://github.com/JuanitoFatas/fast-ruby#stringgsub-vs-stringtr-code'
  253. Enabled: true
  254. ##################### Rails ##################################
  255. Rails/ActionFilter:
  256. Description: 'Enforces consistent use of action filter methods.'
  257. Enabled: false
  258. Rails/Date:
  259. Description: >-
  260. Checks the correct usage of date aware methods,
  261. such as Date.today, Date.current etc.
  262. Enabled: false
  263. Rails/Delegate:
  264. Description: 'Prefer delegate method for delegations.'
  265. Enabled: false
  266. Rails/FindBy:
  267. Description: 'Prefer find_by over where.first.'
  268. Enabled: false
  269. Rails/FindEach:
  270. Description: 'Prefer all.find_each over all.find.'
  271. Enabled: false
  272. Rails/HasAndBelongsToMany:
  273. Description: 'Prefer has_many :through to has_and_belongs_to_many.'
  274. Enabled: false
  275. Rails/Output:
  276. Description: 'Checks for calls to puts, print, etc.'
  277. Enabled: false
  278. Rails/ReadWriteAttribute:
  279. Description: >-
  280. Checks for read_attribute(:attr) and
  281. write_attribute(:attr, val).
  282. Enabled: false
  283. Rails/ScopeArgs:
  284. Description: 'Checks the arguments of ActiveRecord scopes.'
  285. Enabled: false
  286. Rails/TimeZone:
  287. Description: 'Checks the correct usage of time zone aware methods.'
  288. StyleGuide: 'https://github.com/bbatsov/rails-style-guide#time'
  289. Reference: 'http://danilenko.org/2012/7/6/rails_timezones'
  290. Enabled: false
  291. Rails/Validation:
  292. Description: 'Use validates :attribute, hash of validations.'
  293. Enabled: false
  294. ################## Style #################################
  295. Style/AccessModifierIndentation:
  296. Description: Check indentation of private/protected visibility modifiers.
  297. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#indent-public-private-protected'
  298. Enabled: false
  299. Style/AccessorMethodName:
  300. Description: Check the naming of accessor methods for get_/set_.
  301. Enabled: false
  302. Style/Alias:
  303. Description: 'Use alias_method instead of alias.'
  304. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#alias-method'
  305. Enabled: false
  306. Style/AlignArray:
  307. Description: >-
  308. Align the elements of an array literal if they span more than
  309. one line.
  310. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#align-multiline-arrays'
  311. Enabled: false
  312. Style/AlignHash:
  313. Description: >-
  314. Align the elements of a hash literal if they span more than
  315. one line.
  316. Enabled: false
  317. Style/AlignParameters:
  318. Description: >-
  319. Align the parameters of a method call if they span more
  320. than one line.
  321. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-double-indent'
  322. Enabled: false
  323. Style/AndOr:
  324. Description: 'Use &&/|| instead of and/or.'
  325. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-and-or-or'
  326. Enabled: false
  327. Style/ArrayJoin:
  328. Description: 'Use Array#join instead of Array#*.'
  329. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#array-join'
  330. Enabled: false
  331. Style/AsciiComments:
  332. Description: 'Use only ascii symbols in comments.'
  333. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#english-comments'
  334. Enabled: false
  335. Style/AsciiIdentifiers:
  336. Description: 'Use only ascii symbols in identifiers.'
  337. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#english-identifiers'
  338. Enabled: false
  339. Style/Attr:
  340. Description: 'Checks for uses of Module#attr.'
  341. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#attr'
  342. Enabled: false
  343. Style/BeginBlock:
  344. Description: 'Avoid the use of BEGIN blocks.'
  345. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-BEGIN-blocks'
  346. Enabled: false
  347. Style/BarePercentLiterals:
  348. Description: 'Checks if usage of %() or %Q() matches configuration.'
  349. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-q-shorthand'
  350. Enabled: false
  351. Style/BlockComments:
  352. Description: 'Do not use block comments.'
  353. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-block-comments'
  354. Enabled: false
  355. Style/BlockEndNewline:
  356. Description: 'Put end statement of multiline block on its own line.'
  357. Enabled: false
  358. Style/BlockDelimiters:
  359. Description: >-
  360. Avoid using {...} for multi-line blocks (multiline chaining is
  361. always ugly).
  362. Prefer {...} over do...end for single-line blocks.
  363. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#single-line-blocks'
  364. Enabled: false
  365. Style/BracesAroundHashParameters:
  366. Description: 'Enforce braces style around hash parameters.'
  367. Enabled: false
  368. Style/CaseEquality:
  369. Description: 'Avoid explicit use of the case equality operator(===).'
  370. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-case-equality'
  371. Enabled: false
  372. Style/CaseIndentation:
  373. Description: 'Indentation of when in a case/when/[else/]end.'
  374. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#indent-when-to-case'
  375. Enabled: false
  376. Style/CharacterLiteral:
  377. Description: 'Checks for uses of character literals.'
  378. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-character-literals'
  379. Enabled: false
  380. Style/ClassAndModuleCamelCase:
  381. Description: 'Use CamelCase for classes and modules.'
  382. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#camelcase-classes'
  383. Enabled: false
  384. Style/ClassAndModuleChildren:
  385. Description: 'Checks style of children classes and modules.'
  386. Enabled: false
  387. Style/ClassCheck:
  388. Description: 'Enforces consistent use of `Object#is_a?` or `Object#kind_of?`.'
  389. Enabled: false
  390. Style/ClassMethods:
  391. Description: 'Use self when defining module/class methods.'
  392. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#def-self-class-methods'
  393. Enabled: false
  394. Style/ClassVars:
  395. Description: 'Avoid the use of class variables.'
  396. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-class-vars'
  397. Enabled: false
  398. Style/ClosingParenthesisIndentation:
  399. Description: 'Checks the indentation of hanging closing parentheses.'
  400. Enabled: false
  401. Style/ColonMethodCall:
  402. Description: 'Do not use :: for method call.'
  403. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#double-colons'
  404. Enabled: false
  405. Style/CommandLiteral:
  406. Description: 'Use `` or %x around command literals.'
  407. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-x'
  408. Enabled: false
  409. Style/CommentAnnotation:
  410. Description: 'Checks formatting of annotation comments.'
  411. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#annotate-keywords'
  412. Enabled: false
  413. Style/CommentIndentation:
  414. Description: 'Indentation of comments.'
  415. Enabled: false
  416. Style/ConstantName:
  417. Description: 'Constants should use SCREAMING_SNAKE_CASE.'
  418. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#screaming-snake-case'
  419. Enabled: false
  420. Style/DefWithParentheses:
  421. Description: 'Use def with parentheses when there are arguments.'
  422. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#method-parens'
  423. Enabled: false
  424. Style/DeprecatedHashMethods:
  425. Description: 'Checks for use of deprecated Hash methods.'
  426. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-key'
  427. Enabled: false
  428. Style/Documentation:
  429. Description: 'Document classes and non-namespace modules.'
  430. Enabled: false
  431. Style/DotPosition:
  432. Description: 'Checks the position of the dot in multi-line method calls.'
  433. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains'
  434. Enabled: false
  435. Style/DoubleNegation:
  436. Description: 'Checks for uses of double negation (!!).'
  437. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-bang-bang'
  438. Enabled: false
  439. Style/EachWithObject:
  440. Description: 'Prefer `each_with_object` over `inject` or `reduce`.'
  441. Enabled: false
  442. Style/ElseAlignment:
  443. Description: 'Align elses and elsifs correctly.'
  444. Enabled: false
  445. Style/EmptyElse:
  446. Description: 'Avoid empty else-clauses.'
  447. Enabled: false
  448. Style/EmptyLineBetweenDefs:
  449. Description: 'Use empty lines between defs.'
  450. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#empty-lines-between-methods'
  451. Enabled: false
  452. Style/EmptyLines:
  453. Description: "Don't use several empty lines in a row."
  454. Enabled: false
  455. Style/EmptyLinesAroundAccessModifier:
  456. Description: "Keep blank lines around access modifiers."
  457. Enabled: false
  458. Style/EmptyLinesAroundBlockBody:
  459. Description: "Keeps track of empty lines around block bodies."
  460. Enabled: false
  461. Style/EmptyLinesAroundClassBody:
  462. Description: "Keeps track of empty lines around class bodies."
  463. Enabled: false
  464. Style/EmptyLinesAroundModuleBody:
  465. Description: "Keeps track of empty lines around module bodies."
  466. Enabled: false
  467. Style/EmptyLinesAroundMethodBody:
  468. Description: "Keeps track of empty lines around method bodies."
  469. Enabled: false
  470. Style/EmptyLiteral:
  471. Description: 'Prefer literals to Array.new/Hash.new/String.new.'
  472. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#literal-array-hash'
  473. Enabled: false
  474. Style/EndBlock:
  475. Description: 'Avoid the use of END blocks.'
  476. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-END-blocks'
  477. Enabled: false
  478. Style/EndOfLine:
  479. Description: 'Use Unix-style line endings.'
  480. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#crlf'
  481. Enabled: false
  482. Style/EvenOdd:
  483. Description: 'Favor the use of Fixnum#even? && Fixnum#odd?'
  484. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#predicate-methods'
  485. Enabled: false
  486. Style/ExtraSpacing:
  487. Description: 'Do not use unnecessary spacing.'
  488. Enabled: false
  489. Style/FileName:
  490. Description: 'Use snake_case for source file names.'
  491. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-files'
  492. Enabled: false
  493. Style/InitialIndentation:
  494. Description: >-
  495. Checks the indentation of the first non-blank non-comment line in a file.
  496. Enabled: false
  497. Style/FirstParameterIndentation:
  498. Description: 'Checks the indentation of the first parameter in a method call.'
  499. Enabled: false
  500. Style/FlipFlop:
  501. Description: 'Checks for flip flops'
  502. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-flip-flops'
  503. Enabled: false
  504. Style/For:
  505. Description: 'Checks use of for or each in multiline loops.'
  506. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-for-loops'
  507. Enabled: false
  508. Style/FormatString:
  509. Description: 'Enforce the use of Kernel#sprintf, Kernel#format or String#%.'
  510. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#sprintf'
  511. Enabled: false
  512. Style/GlobalVars:
  513. Description: 'Do not introduce global variables.'
  514. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#instance-vars'
  515. Reference: 'http://www.zenspider.com/Languages/Ruby/QuickRef.html'
  516. Enabled: false
  517. Style/GuardClause:
  518. Description: 'Check for conditionals that can be replaced with guard clauses'
  519. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals'
  520. Enabled: false
  521. Style/HashSyntax:
  522. Description: >-
  523. Prefer Ruby 1.9 hash syntax { a: 1, b: 2 } over 1.8 syntax
  524. { :a => 1, :b => 2 }.
  525. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-literals'
  526. Enabled: false
  527. Style/IfUnlessModifier:
  528. Description: >-
  529. Favor modifier if/unless usage when you have a
  530. single-line body.
  531. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier'
  532. Enabled: false
  533. Style/IfWithSemicolon:
  534. Description: 'Do not use if x; .... Use the ternary operator instead.'
  535. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-semicolon-ifs'
  536. Enabled: false
  537. Style/IndentationConsistency:
  538. Description: 'Keep indentation straight.'
  539. Enabled: false
  540. Style/IndentationWidth:
  541. Description: 'Use 2 spaces for indentation.'
  542. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-indentation'
  543. Enabled: false
  544. Style/IndentArray:
  545. Description: >-
  546. Checks the indentation of the first element in an array
  547. literal.
  548. Enabled: false
  549. Style/IndentHash:
  550. Description: 'Checks the indentation of the first key in a hash literal.'
  551. Enabled: false
  552. Style/InfiniteLoop:
  553. Description: 'Use Kernel#loop for infinite loops.'
  554. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#infinite-loop'
  555. Enabled: false
  556. Style/Lambda:
  557. Description: 'Use the new lambda literal syntax for single-line blocks.'
  558. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#lambda-multi-line'
  559. Enabled: false
  560. Style/LambdaCall:
  561. Description: 'Use lambda.call(...) instead of lambda.(...).'
  562. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#proc-call'
  563. Enabled: false
  564. Style/LeadingCommentSpace:
  565. Description: 'Comments should start with a space.'
  566. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-space'
  567. Enabled: false
  568. Style/LineEndConcatenation:
  569. Description: >-
  570. Use \ instead of + or << to concatenate two string literals at
  571. line end.
  572. Enabled: false
  573. Style/MethodCallParentheses:
  574. Description: 'Do not use parentheses for method calls with no arguments.'
  575. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-args-no-parens'
  576. Enabled: false
  577. Style/MethodDefParentheses:
  578. Description: >-
  579. Checks if the method definitions have or don't have
  580. parentheses.
  581. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#method-parens'
  582. Enabled: false
  583. Style/MethodName:
  584. Description: 'Use the configured style when naming methods.'
  585. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars'
  586. Enabled: false
  587. Style/ModuleFunction:
  588. Description: 'Checks for usage of `extend self` in modules.'
  589. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#module-function'
  590. Enabled: false
  591. Style/MultilineBlockChain:
  592. Description: 'Avoid multi-line chains of blocks.'
  593. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#single-line-blocks'
  594. Enabled: false
  595. Style/MultilineBlockLayout:
  596. Description: 'Ensures newlines after multiline block do statements.'
  597. Enabled: false
  598. Style/MultilineIfThen:
  599. Description: 'Do not use then for multi-line if/unless.'
  600. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-then'
  601. Enabled: false
  602. Style/MultilineOperationIndentation:
  603. Description: >-
  604. Checks indentation of binary operations that span more than
  605. one line.
  606. Enabled: false
  607. Style/MultilineTernaryOperator:
  608. Description: >-
  609. Avoid multi-line ?: (the ternary operator);
  610. use if/unless instead.
  611. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-multiline-ternary'
  612. Enabled: false
  613. Style/NegatedIf:
  614. Description: >-
  615. Favor unless over if for negative conditions
  616. (or control flow or).
  617. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#unless-for-negatives'
  618. Enabled: false
  619. Style/NegatedWhile:
  620. Description: 'Favor until over while for negative conditions.'
  621. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#until-for-negatives'
  622. Enabled: false
  623. Style/NestedTernaryOperator:
  624. Description: 'Use one expression per branch in a ternary operator.'
  625. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-ternary'
  626. Enabled: false
  627. Style/Next:
  628. Description: 'Use `next` to skip iteration instead of a condition at the end.'
  629. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals'
  630. Enabled: false
  631. Style/NilComparison:
  632. Description: 'Prefer x.nil? to x == nil.'
  633. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#predicate-methods'
  634. Enabled: false
  635. Style/NonNilCheck:
  636. Description: 'Checks for redundant nil checks.'
  637. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-non-nil-checks'
  638. Enabled: false
  639. Style/Not:
  640. Description: 'Use ! instead of not.'
  641. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#bang-not-not'
  642. Enabled: false
  643. Style/NumericLiterals:
  644. Description: >-
  645. Add underscores to large numeric literals to improve their
  646. readability.
  647. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscores-in-numerics'
  648. Enabled: false
  649. Style/OneLineConditional:
  650. Description: >-
  651. Favor the ternary operator(?:) over
  652. if/then/else/end constructs.
  653. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#ternary-operator'
  654. Enabled: false
  655. Style/OpMethod:
  656. Description: 'When defining binary operators, name the argument other.'
  657. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#other-arg'
  658. Enabled: false
  659. Style/OptionalArguments:
  660. Description: >-
  661. Checks for optional arguments that do not appear at the end
  662. of the argument list
  663. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#optional-arguments'
  664. Enabled: false
  665. Style/ParallelAssignment:
  666. Description: >-
  667. Check for simple usages of parallel assignment.
  668. It will only warn when the number of variables
  669. matches on both sides of the assignment.
  670. This also provides performance benefits
  671. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parallel-assignment'
  672. Enabled: false
  673. Style/ParenthesesAroundCondition:
  674. Description: >-
  675. Don't use parentheses around the condition of an
  676. if/unless/while.
  677. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-parens-if'
  678. Enabled: false
  679. Style/PercentLiteralDelimiters:
  680. Description: 'Use `%`-literal delimiters consistently'
  681. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-literal-braces'
  682. Enabled: false
  683. Style/PercentQLiterals:
  684. Description: 'Checks if uses of %Q/%q match the configured preference.'
  685. Enabled: false
  686. Style/PerlBackrefs:
  687. Description: 'Avoid Perl-style regex back references.'
  688. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers'
  689. Enabled: false
  690. Style/PredicateName:
  691. Description: 'Check the names of predicate methods.'
  692. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark'
  693. Enabled: false
  694. Style/Proc:
  695. Description: 'Use proc instead of Proc.new.'
  696. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#proc'
  697. Enabled: false
  698. Style/RaiseArgs:
  699. Description: 'Checks the arguments passed to raise/fail.'
  700. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#exception-class-messages'
  701. Enabled: false
  702. Style/RedundantBegin:
  703. Description: "Don't use begin blocks when they are not needed."
  704. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#begin-implicit'
  705. Enabled: false
  706. Style/RedundantException:
  707. Description: "Checks for an obsolete RuntimeException argument in raise/fail."
  708. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-explicit-runtimeerror'
  709. Enabled: false
  710. Style/RedundantReturn:
  711. Description: "Don't use return where it's not required."
  712. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-explicit-return'
  713. Enabled: false
  714. Style/RedundantSelf:
  715. Description: "Don't use self where it's not needed."
  716. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-self-unless-required'
  717. Enabled: false
  718. Style/RegexpLiteral:
  719. Description: 'Use / or %r around regular expressions.'
  720. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-r'
  721. Enabled: false
  722. Style/RescueEnsureAlignment:
  723. Description: 'Align rescues and ensures correctly.'
  724. Enabled: false
  725. Style/RescueModifier:
  726. Description: 'Avoid using rescue in its modifier form.'
  727. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-rescue-modifiers'
  728. Enabled: false
  729. Style/SelfAssignment:
  730. Description: >-
  731. Checks for places where self-assignment shorthand should have
  732. been used.
  733. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#self-assignment'
  734. Enabled: false
  735. Style/Semicolon:
  736. Description: "Don't use semicolons to terminate expressions."
  737. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-semicolon'
  738. Enabled: false
  739. Style/SignalException:
  740. Description: 'Checks for proper usage of fail and raise.'
  741. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#fail-method'
  742. Enabled: false
  743. Style/SingleLineBlockParams:
  744. Description: 'Enforces the names of some block params.'
  745. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#reduce-blocks'
  746. Enabled: false
  747. Style/SingleLineMethods:
  748. Description: 'Avoid single-line methods.'
  749. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-single-line-methods'
  750. Enabled: false
  751. Style/SpaceBeforeFirstArg:
  752. Description: >-
  753. Checks that exactly one space is used between a method name
  754. and the first argument for method calls without parentheses.
  755. Enabled: true
  756. Style/SpaceAfterColon:
  757. Description: 'Use spaces after colons.'
  758. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
  759. Enabled: false
  760. Style/SpaceAfterComma:
  761. Description: 'Use spaces after commas.'
  762. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
  763. Enabled: false
  764. Style/SpaceAroundKeyword:
  765. Description: 'Use spaces around keywords.'
  766. Enabled: false
  767. Style/SpaceAfterMethodName:
  768. Description: >-
  769. Do not put a space between a method name and the opening
  770. parenthesis in a method definition.
  771. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-no-spaces'
  772. Enabled: false
  773. Style/SpaceAfterNot:
  774. Description: Tracks redundant space after the ! operator.
  775. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-space-bang'
  776. Enabled: false
  777. Style/SpaceAfterSemicolon:
  778. Description: 'Use spaces after semicolons.'
  779. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
  780. Enabled: false
  781. Style/SpaceBeforeBlockBraces:
  782. Description: >-
  783. Checks that the left block brace has or doesn't have space
  784. before it.
  785. Enabled: false
  786. Style/SpaceBeforeComma:
  787. Description: 'No spaces before commas.'
  788. Enabled: false
  789. Style/SpaceBeforeComment:
  790. Description: >-
  791. Checks for missing space between code and a comment on the
  792. same line.
  793. Enabled: false
  794. Style/SpaceBeforeSemicolon:
  795. Description: 'No spaces before semicolons.'
  796. Enabled: false
  797. Style/SpaceInsideBlockBraces:
  798. Description: >-
  799. Checks that block braces have or don't have surrounding space.
  800. For blocks taking parameters, checks that the left brace has
  801. or doesn't have trailing space.
  802. Enabled: false
  803. Style/SpaceAroundBlockParameters:
  804. Description: 'Checks the spacing inside and after block parameters pipes.'
  805. Enabled: false
  806. Style/SpaceAroundEqualsInParameterDefault:
  807. Description: >-
  808. Checks that the equals signs in parameter default assignments
  809. have or don't have surrounding space depending on
  810. configuration.
  811. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-around-equals'
  812. Enabled: false
  813. Style/SpaceAroundOperators:
  814. Description: 'Use a single space around operators.'
  815. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
  816. Enabled: false
  817. Style/SpaceInsideBrackets:
  818. Description: 'No spaces after [ or before ].'
  819. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-spaces-braces'
  820. Enabled: false
  821. Style/SpaceInsideHashLiteralBraces:
  822. Description: "Use spaces inside hash literal braces - or don't."
  823. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
  824. Enabled: false
  825. Style/SpaceInsideParens:
  826. Description: 'No spaces after ( or before ).'
  827. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-spaces-braces'
  828. Enabled: false
  829. Style/SpaceInsideRangeLiteral:
  830. Description: 'No spaces inside range literals.'
  831. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-space-inside-range-literals'
  832. Enabled: false
  833. Style/SpaceInsideStringInterpolation:
  834. Description: 'Checks for padding/surrounding spaces inside string interpolation.'
  835. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#string-interpolation'
  836. Enabled: false
  837. Style/SpecialGlobalVars:
  838. Description: 'Avoid Perl-style global variables.'
  839. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-cryptic-perlisms'
  840. Enabled: false
  841. Style/StringLiterals:
  842. Description: 'Checks if uses of quotes match the configured preference.'
  843. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#consistent-string-literals'
  844. Enabled: false
  845. Style/StringLiteralsInInterpolation:
  846. Description: >-
  847. Checks if uses of quotes inside expressions in interpolated
  848. strings match the configured preference.
  849. Enabled: false
  850. Style/StructInheritance:
  851. Description: 'Checks for inheritance from Struct.new.'
  852. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-extend-struct-new'
  853. Enabled: false
  854. Style/SymbolLiteral:
  855. Description: 'Use plain symbols instead of string symbols when possible.'
  856. Enabled: false
  857. Style/SymbolProc:
  858. Description: 'Use symbols as procs instead of blocks when possible.'
  859. Enabled: false
  860. Style/Tab:
  861. Description: 'No hard tabs.'
  862. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-indentation'
  863. Enabled: false
  864. Style/TrailingBlankLines:
  865. Description: 'Checks trailing blank lines and final newline.'
  866. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#newline-eof'
  867. Enabled: false
  868. Style/TrailingCommaInArguments:
  869. Description: 'Checks for trailing comma in parameter lists.'
  870. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-params-comma'
  871. Enabled: false
  872. Style/TrailingCommaInLiteral:
  873. Description: 'Checks for trailing comma in literals.'
  874. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
  875. Enabled: false
  876. Style/TrailingWhitespace:
  877. Description: 'Avoid trailing whitespace.'
  878. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-whitespace'
  879. Enabled: false
  880. Style/TrivialAccessors:
  881. Description: 'Prefer attr_* methods to trivial readers/writers.'
  882. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#attr_family'
  883. Enabled: false
  884. Style/UnlessElse:
  885. Description: >-
  886. Do not use unless with else. Rewrite these with the positive
  887. case first.
  888. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-else-with-unless'
  889. Enabled: false
  890. Style/UnneededCapitalW:
  891. Description: 'Checks for %W when interpolation is not needed.'
  892. Enabled: false
  893. Style/UnneededPercentQ:
  894. Description: 'Checks for %q/%Q when single quotes or double quotes would do.'
  895. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-q'
  896. Enabled: false
  897. Style/TrailingUnderscoreVariable:
  898. Description: >-
  899. Checks for the usage of unneeded trailing underscores at the
  900. end of parallel variable assignment.
  901. Enabled: false
  902. Style/VariableInterpolation:
  903. Description: >-
  904. Don't interpolate global, instance and class variables
  905. directly in strings.
  906. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#curlies-interpolate'
  907. Enabled: false
  908. Style/VariableName:
  909. Description: 'Use the configured style when naming variables.'
  910. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars'
  911. Enabled: false
  912. Style/WhenThen:
  913. Description: 'Use when x then ... for one-line cases.'
  914. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#one-line-cases'
  915. Enabled: false
  916. Style/WhileUntilDo:
  917. Description: 'Checks for redundant do after while or until.'
  918. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-multiline-while-do'
  919. Enabled: false
  920. Style/WhileUntilModifier:
  921. Description: >-
  922. Favor modifier while/until usage when you have a
  923. single-line body.
  924. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#while-as-a-modifier'
  925. Enabled: false
  926. Style/WordArray:
  927. Description: 'Use %w or %W for arrays of words.'
  928. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-w'
  929. Enabled: false