Skip to content

Commit

Permalink
Rubocop: Bump Ruby version to 2.6 and define new cops
Browse files Browse the repository at this point in the history
  • Loading branch information
bcoles committed Jan 25, 2021
1 parent a8213b7 commit ae1f5a4
Showing 1 changed file with 99 additions and 7 deletions.
106 changes: 99 additions & 7 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# inherit_from: .rubocop_todo.yml

AllCops:
TargetRubyVersion: 2.4
TargetRubyVersion: 2.6

require:
- ./lib/rubocop/cop/layout/module_hash_on_new_line.rb
Expand All @@ -31,6 +31,54 @@ Lint/ModuleDisclosureDatePresent:
# Only exploits require disclosure dates, but they can be present in auxiliary modules etc.
- 'modules/exploits/**/*'

Lint/AmbiguousAssignment:
Description: 'TODO: review'
Enabled: false

Lint/DeprecatedConstants:
Description: 'TODO: review'
Enabled: false

Lint/DuplicateBranch:
Description: 'TODO: review'
Enabled: false

Lint/DuplicateRegexpCharacterClassElement:
Description: 'TODO: review'
Enabled: false

Lint/EmptyBlock:
Description: 'TODO: review'
Enabled: false

Lint/EmptyClass:
Description: 'TODO: review'
Enabled: false

Lint/LambdaWithoutLiteralBlock:
Description: 'TODO: review'
Enabled: false

Lint/NoReturnInBeginEndBlocks:
Description: 'TODO: review'
Enabled: false

Lint/RedundantDirGlobSort:
Description: 'TODO: review'
Enabled: false

Lint/ToEnumArguments:
Description: 'TODO: review'
Enabled: false

Lint/UnexpectedBlockArity:
Description: 'TODO: review'
Enabled: false

Lint/UnmodifiedReduceAccumulator:
Description: 'TODO: review'
Enabled: false

Metrics/ClassLength:
Description: 'Most Metasploit modules are quite large. This is ok.'
Enabled: true
Expand Down Expand Up @@ -79,6 +127,10 @@ Style/Documentation:
Exclude:
- 'modules/**/*'

Layout/SpaceBeforeBrackets:
Description: 'TODO: review'
Enabled: false

Layout/FirstArgumentIndentation:
Enabled: true
EnforcedStyle: consistent
Expand All @@ -98,6 +150,13 @@ Layout/FirstHashElementLineBreak:
Enabled: true
Description: 'Enforce consistency by breaking hash elements on to new lines'

Layout/LineLength:
Description: >-
Metasploit modules often pattern match against very
long strings when identifying targets.
Enabled: true
Max: 180

Layout/SpaceInsideArrayLiteralBrackets:
Enabled: false
Description: 'Almost all module metadata have space in brackets'
Expand Down Expand Up @@ -130,12 +189,45 @@ Style/TrailingCommaInArrayLiteral:
Enabled: false
Description: 'This is often a useful pattern, and is actually required by other languages. It does not hurt.'

Metrics/LineLength:
Description: >-
Metasploit modules often pattern match against very
long strings when identifying targets.
Enabled: true
Max: 180
Style/TrailingCommaInHashLiteral:
Enabled: false
Description: 'This is often a useful pattern, and is actually required by other languages. It does not hurt.'

Style/ArgumentsForwarding:
Description: 'TODO: review'
Enabled: false

Style/CollectionCompact:
Description: 'TODO: review'
Enabled: false

Style/DocumentDynamicEvalDefinition:
Description: 'TODO: review'
Enabled: false

Style/EndlessMethod:
Description: 'TODO: review'
Enabled: false

Style/HashExcept:
Description: 'TODO: review'
Enabled: false

Style/NegatedIfElseCondition:
Description: 'TODO: review'
Enabled: false

Style/NilLambda:
Description: 'TODO: review'
Enabled: false

Style/RedundantArgument:
Description: 'TODO: review'
Enabled: false

Style/SwapValues:
Description: 'TODO: review'
Enabled: false

Metrics/BlockLength:
Enabled: true
Expand Down

0 comments on commit ae1f5a4

Please sign in to comment.