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.

.rubocop.yml 7.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508
  1. require: rubocop-rspec
  2. AllCops:
  3. TargetRubyVersion: 1.9
  4. Include:
  5. - ./**/*.rb
  6. Exclude:
  7. - vendor/**/*
  8. - .vendor/**/*
  9. - pkg/**/*
  10. - spec/fixtures/**/*
  11. Lint/ConditionPosition:
  12. Enabled: True
  13. Lint/ElseLayout:
  14. Enabled: True
  15. Lint/UnreachableCode:
  16. Enabled: True
  17. Lint/UselessComparison:
  18. Enabled: True
  19. Lint/EnsureReturn:
  20. Enabled: True
  21. Lint/HandleExceptions:
  22. Enabled: True
  23. Lint/LiteralInCondition:
  24. Enabled: True
  25. Lint/ShadowingOuterLocalVariable:
  26. Enabled: True
  27. Lint/LiteralInInterpolation:
  28. Enabled: True
  29. Style/HashSyntax:
  30. Enabled: True
  31. Style/RedundantReturn:
  32. Enabled: True
  33. Lint/AmbiguousOperator:
  34. Enabled: True
  35. Lint/AssignmentInCondition:
  36. Enabled: True
  37. Style/SpaceBeforeComment:
  38. Enabled: True
  39. Style/AndOr:
  40. Enabled: True
  41. Style/RedundantSelf:
  42. Enabled: True
  43. # Method length is not necessarily an indicator of code quality
  44. Metrics/MethodLength:
  45. Enabled: False
  46. # Module length is not necessarily an indicator of code quality
  47. Metrics/ModuleLength:
  48. Enabled: False
  49. Style/WhileUntilModifier:
  50. Enabled: True
  51. Lint/AmbiguousRegexpLiteral:
  52. Enabled: True
  53. Lint/Eval:
  54. Enabled: True
  55. Lint/BlockAlignment:
  56. Enabled: True
  57. Lint/DefEndAlignment:
  58. Enabled: True
  59. Lint/EndAlignment:
  60. Enabled: True
  61. Lint/DeprecatedClassMethods:
  62. Enabled: True
  63. Lint/Loop:
  64. Enabled: True
  65. Lint/ParenthesesAsGroupedExpression:
  66. Enabled: True
  67. Lint/RescueException:
  68. Enabled: True
  69. Lint/StringConversionInInterpolation:
  70. Enabled: True
  71. Lint/UnusedBlockArgument:
  72. Enabled: True
  73. Lint/UnusedMethodArgument:
  74. Enabled: True
  75. Lint/UselessAccessModifier:
  76. Enabled: True
  77. Lint/UselessAssignment:
  78. Enabled: True
  79. Lint/Void:
  80. Enabled: True
  81. Style/AccessModifierIndentation:
  82. Enabled: True
  83. Style/AccessorMethodName:
  84. Enabled: True
  85. Style/Alias:
  86. Enabled: True
  87. Style/AlignArray:
  88. Enabled: True
  89. Style/AlignHash:
  90. Enabled: True
  91. Style/AlignParameters:
  92. Enabled: True
  93. Metrics/BlockNesting:
  94. Enabled: True
  95. Style/AsciiComments:
  96. Enabled: True
  97. Style/Attr:
  98. Enabled: True
  99. Style/BracesAroundHashParameters:
  100. Enabled: True
  101. Style/CaseEquality:
  102. Enabled: True
  103. Style/CaseIndentation:
  104. Enabled: True
  105. Style/CharacterLiteral:
  106. Enabled: True
  107. Style/ClassAndModuleCamelCase:
  108. Enabled: True
  109. Style/ClassAndModuleChildren:
  110. Enabled: False
  111. Style/ClassCheck:
  112. Enabled: True
  113. # Class length is not necessarily an indicator of code quality
  114. Metrics/ClassLength:
  115. Enabled: False
  116. Style/ClassMethods:
  117. Enabled: True
  118. Style/ClassVars:
  119. Enabled: True
  120. Style/WhenThen:
  121. Enabled: True
  122. Style/WordArray:
  123. Enabled: True
  124. Style/UnneededPercentQ:
  125. Enabled: True
  126. Style/Tab:
  127. Enabled: True
  128. Style/SpaceBeforeSemicolon:
  129. Enabled: True
  130. Style/TrailingBlankLines:
  131. Enabled: True
  132. Style/SpaceInsideBlockBraces:
  133. Enabled: True
  134. Style/SpaceInsideBrackets:
  135. Enabled: True
  136. Style/SpaceInsideHashLiteralBraces:
  137. Enabled: True
  138. Style/SpaceInsideParens:
  139. Enabled: True
  140. Style/LeadingCommentSpace:
  141. Enabled: True
  142. Style/SpaceBeforeFirstArg:
  143. Enabled: True
  144. Style/SpaceAfterColon:
  145. Enabled: True
  146. Style/SpaceAfterComma:
  147. Enabled: True
  148. Style/SpaceAfterMethodName:
  149. Enabled: True
  150. Style/SpaceAfterNot:
  151. Enabled: True
  152. Style/SpaceAfterSemicolon:
  153. Enabled: True
  154. Style/SpaceAroundEqualsInParameterDefault:
  155. Enabled: True
  156. Style/SpaceAroundOperators:
  157. Enabled: True
  158. Style/SpaceBeforeBlockBraces:
  159. Enabled: True
  160. Style/SpaceBeforeComma:
  161. Enabled: True
  162. Style/CollectionMethods:
  163. Enabled: True
  164. Style/CommentIndentation:
  165. Enabled: True
  166. Style/ColonMethodCall:
  167. Enabled: True
  168. Style/CommentAnnotation:
  169. Enabled: True
  170. # 'Complexity' is very relative
  171. Metrics/CyclomaticComplexity:
  172. Enabled: False
  173. Style/ConstantName:
  174. Enabled: True
  175. Style/Documentation:
  176. Enabled: False
  177. Style/DefWithParentheses:
  178. Enabled: True
  179. Style/PreferredHashMethods:
  180. Enabled: True
  181. Style/DotPosition:
  182. EnforcedStyle: trailing
  183. Style/DoubleNegation:
  184. Enabled: True
  185. Style/EachWithObject:
  186. Enabled: True
  187. Style/EmptyLineBetweenDefs:
  188. Enabled: True
  189. Style/IndentArray:
  190. Enabled: True
  191. Style/IndentHash:
  192. Enabled: True
  193. Style/IndentationConsistency:
  194. Enabled: True
  195. Style/IndentationWidth:
  196. Enabled: True
  197. Style/EmptyLines:
  198. Enabled: True
  199. Style/EmptyLinesAroundAccessModifier:
  200. Enabled: True
  201. Style/EmptyLiteral:
  202. Enabled: True
  203. # Configuration parameters: AllowURI, URISchemes.
  204. Metrics/LineLength:
  205. Enabled: False
  206. Style/MethodCallParentheses:
  207. Enabled: True
  208. Style/MethodDefParentheses:
  209. Enabled: True
  210. Style/LineEndConcatenation:
  211. Enabled: True
  212. Style/TrailingWhitespace:
  213. Enabled: True
  214. Style/StringLiterals:
  215. Enabled: True
  216. Style/TrailingCommaInArguments:
  217. Enabled: True
  218. Style/TrailingCommaInLiteral:
  219. Enabled: True
  220. Style/GlobalVars:
  221. Enabled: True
  222. Style/GuardClause:
  223. Enabled: True
  224. Style/IfUnlessModifier:
  225. Enabled: True
  226. Style/MultilineIfThen:
  227. Enabled: True
  228. Style/NegatedIf:
  229. Enabled: True
  230. Style/NegatedWhile:
  231. Enabled: True
  232. Style/Next:
  233. Enabled: True
  234. Style/SingleLineBlockParams:
  235. Enabled: True
  236. Style/SingleLineMethods:
  237. Enabled: True
  238. Style/SpecialGlobalVars:
  239. Enabled: True
  240. Style/TrivialAccessors:
  241. Enabled: True
  242. Style/UnlessElse:
  243. Enabled: True
  244. Style/VariableInterpolation:
  245. Enabled: True
  246. Style/VariableName:
  247. Enabled: True
  248. Style/WhileUntilDo:
  249. Enabled: True
  250. Style/EvenOdd:
  251. Enabled: True
  252. Style/FileName:
  253. Enabled: True
  254. Style/For:
  255. Enabled: True
  256. Style/Lambda:
  257. Enabled: True
  258. Style/MethodName:
  259. Enabled: True
  260. Style/MultilineTernaryOperator:
  261. Enabled: True
  262. Style/NestedTernaryOperator:
  263. Enabled: True
  264. Style/NilComparison:
  265. Enabled: True
  266. Style/FormatString:
  267. Enabled: True
  268. Style/MultilineBlockChain:
  269. Enabled: True
  270. Style/Semicolon:
  271. Enabled: True
  272. Style/SignalException:
  273. Enabled: True
  274. Style/NonNilCheck:
  275. Enabled: True
  276. Style/Not:
  277. Enabled: True
  278. Style/NumericLiterals:
  279. Enabled: True
  280. Style/OneLineConditional:
  281. Enabled: True
  282. Style/OpMethod:
  283. Enabled: True
  284. Style/ParenthesesAroundCondition:
  285. Enabled: True
  286. Style/PercentLiteralDelimiters:
  287. Enabled: True
  288. Style/PerlBackrefs:
  289. Enabled: True
  290. Style/PredicateName:
  291. Enabled: True
  292. Style/RedundantException:
  293. Enabled: True
  294. Style/SelfAssignment:
  295. Enabled: True
  296. Style/Proc:
  297. Enabled: True
  298. Style/RaiseArgs:
  299. Enabled: True
  300. Style/RedundantBegin:
  301. Enabled: True
  302. Style/RescueModifier:
  303. Enabled: True
  304. # based on https://github.com/voxpupuli/modulesync_config/issues/168
  305. Style/RegexpLiteral:
  306. EnforcedStyle: percent_r
  307. Enabled: True
  308. Lint/UnderscorePrefixedVariableName:
  309. Enabled: True
  310. Metrics/ParameterLists:
  311. Enabled: False
  312. Lint/RequireParentheses:
  313. Enabled: True
  314. Style/SpaceBeforeFirstArg:
  315. Enabled: True
  316. Style/ModuleFunction:
  317. Enabled: True
  318. Lint/Debugger:
  319. Enabled: True
  320. Style/IfWithSemicolon:
  321. Enabled: True
  322. Style/Encoding:
  323. Enabled: True
  324. Style/BlockDelimiters:
  325. Enabled: True
  326. Style/MultilineBlockLayout:
  327. Enabled: True
  328. # 'Complexity' is very relative
  329. Metrics/AbcSize:
  330. Enabled: False
  331. # 'Complexity' is very relative
  332. Metrics/PerceivedComplexity:
  333. Enabled: False
  334. Lint/UselessAssignment:
  335. Enabled: True
  336. Style/ClosingParenthesisIndentation:
  337. Enabled: True
  338. # RSpec
  339. # We don't use rspec in this way
  340. RSpec/DescribeClass:
  341. Enabled: False
  342. # Example length is not necessarily an indicator of code quality
  343. RSpec/ExampleLength:
  344. Enabled: False
  345. RSpec/NamedSubject:
  346. Enabled: False