Skip to content

Instantly share code, notes, and snippets.

@theseanything
Last active January 15, 2021 09:45
Show Gist options
  • Save theseanything/7a51738369fc9f686e2c9a0c03654677 to your computer and use it in GitHub Desktop.
Save theseanything/7a51738369fc9f686e2c9a0c03654677 to your computer and use it in GitHub Desktop.
Cop Name Offenses Auto-correctable Enable Notes
Naming/VariableNumber 401 No Extended in v1.2 to handle method names and symbols.
Style/StringConcatenation 372 Yes (Unsafe) Added in v0.89. String interplation vs concatenation is somewhat inconsistent in our codebase already. Would probably benefit from this.
Style/AccessorGrouping 182 Yes Majority of offenses in Smart Answers, and a few in Whitehall.
RSpec/MultipleMemoizedHelpers 152 No Added in v1.43. Majority offenses in Asset Manager. Rest in Content Publisher, Bouncer, Authenticating Proxy. Maybe tricky to fix, however preferable to disable in individual repos to allow us to enable for the rest.
Style/GlobalStdStream 104 Yes (Unsafe) Added in v0.89. Theres at least 1 offence in most repos, usually around setting up logging. Should be an easy fix. More information in the Ruby style guide
Style/RedundantRegexpEscape 95 Yes Added in v0.85. Handful of offences in about 20~ repos. Easy to fix.
Layout/EmptyLinesAroundAttributeAccessor 89 Yes Added in v0.83. Affects majority of repos, but easy to fix.
Lint/ConstantDefinitionInBlock 87 No Added in v0.91. Affects majority of repos, but easy to fix.
Lint/MissingSuper 75 No Added in v0.89. 3 out of 15 repos have majority of offences, maybe tricky to fix as impacts code logic (can disable in individual repos, where difficult to fix).
Style/SingleArgumentDig 59 Yes (Unsafe) Added in v0.89. Offences present in 10 repos, majority in 3 of them.
Style/CaseLikeIf 55 Yes(Unsafe) Added in v0.88. Most offenses in Whitehall and Smart Answers.
Style/OptionalBooleanParameter 51 No Added in v0.89.
Layout/EmptyLineBetweenDefs 50 Yes Extended in v1.4 to check empty lines between Module, Class and Method defs.
Style/SlicingWithRange 40 Yes (unsafe)
Style/SoleNestedConditional 35 Yes
Style/ExplicitBlockArgument 32 Yes (unsafe)
Style/KeywordParametersOrder 30 Yes
Style/RedundantFetchBlock 28 Yes (unsafe)
Lint/UselessMethodDefinition 21 Yes(unsafe)
Layout/RescueEnsureAlignment 19 Yes
Style/RedundantAssignment 19 Yes
Style/HashAsLastArrayItem 18 Yes
Style/CommentAnnotation 18 Yes
RSpec/StubbedMock 17
Style/RedundantFileExtensionInRequire 15 Yes
Layout/BeginEndAlignment 14 Yes
Lint/RedundantCopDisableDirective 10 Yes
Layout/AccessModifierIndentation 10 Yes
Style/ClassEqualityComparison 6
Lint/MixedRegexpCaptureTypes 6
Style/CombinableLoops 5
Style/RedundantRegexpCharacterClass 5
Layout/SpaceAroundMethodCallOperator 4
Lint/UselessTimes 4
Style/HashTransformValues 3
Lint/EmptyFile 3
Lint/DuplicateRequire 3
Style/HashTransformKeys 2
Style/RedundantSelf 2
Lint/DeprecatedOpenSSLConstant 2
Lint/SelfAssignment 2
Lint/Debugger 2
Style/RedundantParentheses 1
Style/MixinUsage 1
Security/Open 1
Bundler/OrderedGems 1
Lint/BinaryOperatorWithIdenticalOperands 1
Style/RedundantBegin 1
Style/HashEachMethods 1
Naming/MemoizedInstanceVariableName 1
Lint/RaiseException 1
Lint/StructNewOverride 1
Style/HashLikeCase 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment