]> cat aescling's git repositories - mastodon.git/commitdiff
Disable the Rubocop Style/GuardClause cop (#3316)
authorMatt Jankowski <mjankowski@thoughtbot.com>
Thu, 25 May 2017 19:15:14 +0000 (15:15 -0400)
committerEugen Rochko <eugen@zeonfederated.com>
Thu, 25 May 2017 19:15:14 +0000 (21:15 +0200)
There are many spots throughout the codebase which are showing as covered by
specs in the simplecov output -- but which are not actually run, because they
are on the same line as a guard clause.

I plan on fixing some of these issues, but don't want to keep triggering this
rubocop style violation.

My preference would be that we use the PR review process to identify places
where a guard clause might be appropriate, but that we leave this cop turned off
by default.

.rubocop.yml

index 674865c46855c1445f4b179feaa679c738547d3c..295787e267fb28de88e2f40380b8180f73ef1ff2 100644 (file)
@@ -74,6 +74,9 @@ Style/RegexpLiteral:
 Style/Lambda:
   Enabled: false
 
+Style/GuardClause:
+  Enabled: false
+
 Rails/HasAndBelongsToMany:
   Enabled: false