tweak rubocop disabling some less desirable noise
parent
1bf93ab1bc
commit
19e6507ac4
58
.rubocop.yml
58
.rubocop.yml
|
@ -45,6 +45,10 @@ Style/RedundantReturn:
|
||||||
Description: 'This often looks weird when mixed with actual returns, and hurts nothing'
|
Description: 'This often looks weird when mixed with actual returns, and hurts nothing'
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
|
Naming/VariableNumber:
|
||||||
|
Description: 'To make it easier to use reference code, disable this cop'
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
Style/NumericPredicate:
|
Style/NumericPredicate:
|
||||||
Description: 'This adds no efficiency nor space saving'
|
Description: 'This adds no efficiency nor space saving'
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
@ -59,10 +63,18 @@ Layout/IndentHeredoc:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
Description: 'We need to leave this disabled for Ruby 2.2 compat, remove in 2018'
|
Description: 'We need to leave this disabled for Ruby 2.2 compat, remove in 2018'
|
||||||
|
|
||||||
|
Layout/SpaceInsideArrayLiteralBrackets:
|
||||||
|
Enabled: false
|
||||||
|
Description: 'Almost all module metadata have space in brackets'
|
||||||
|
|
||||||
Style/GuardClause:
|
Style/GuardClause:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
Description: 'This often introduces bugs in tested code'
|
Description: 'This often introduces bugs in tested code'
|
||||||
|
|
||||||
|
Style/EmptyLiteral:
|
||||||
|
Enabled: false
|
||||||
|
Description: 'This looks awkward when you mix empty and non-empty literals'
|
||||||
|
|
||||||
Style/NegatedIf:
|
Style/NegatedIf:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
Description: 'This often introduces bugs in tested code'
|
Description: 'This often introduces bugs in tested code'
|
||||||
|
@ -72,9 +84,16 @@ Style/ConditionalAssignment:
|
||||||
Description: 'This is confusing for folks coming from other languages'
|
Description: 'This is confusing for folks coming from other languages'
|
||||||
|
|
||||||
Style/Encoding:
|
Style/Encoding:
|
||||||
Enabled: true
|
|
||||||
Description: 'We prefer binary to UTF-8.'
|
Description: 'We prefer binary to UTF-8.'
|
||||||
EnforcedStyle: 'when_needed'
|
Enabled: false
|
||||||
|
|
||||||
|
Style/ParenthesesAroundCondition:
|
||||||
|
Enabled: false
|
||||||
|
Description: 'This is used in too many places to discount, especially in ported code. Has little effect'
|
||||||
|
|
||||||
|
Style/TrailingCommaInArrayLiteral:
|
||||||
|
Enabled: false
|
||||||
|
Description: 'This is often a useful pattern, and is actually required by other languages. It does not hurt.'
|
||||||
|
|
||||||
Metrics/LineLength:
|
Metrics/LineLength:
|
||||||
Description: >-
|
Description: >-
|
||||||
|
@ -83,6 +102,13 @@ Metrics/LineLength:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
Max: 180
|
Max: 180
|
||||||
|
|
||||||
|
Metrics/BlockLength:
|
||||||
|
Enabled: true
|
||||||
|
Description: >-
|
||||||
|
While the style guide suggests 10 lines, exploit definitions
|
||||||
|
often exceed 200 lines.
|
||||||
|
Max: 300
|
||||||
|
|
||||||
Metrics/MethodLength:
|
Metrics/MethodLength:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
Description: >-
|
Description: >-
|
||||||
|
@ -90,10 +116,10 @@ Metrics/MethodLength:
|
||||||
often exceed 200 lines.
|
often exceed 200 lines.
|
||||||
Max: 300
|
Max: 300
|
||||||
|
|
||||||
# Basically everything in metasploit needs binary encoding, not UTF-8.
|
Naming/UncommunicativeMethodParamName:
|
||||||
# Disable this here and enforce it through msftidy
|
Enabled: true
|
||||||
Style/Encoding:
|
Description: 'Whoever made this requirement never looked at crypto methods, IV'
|
||||||
Enabled: false
|
MinNameLength: 2
|
||||||
|
|
||||||
# %q() is super useful for long strings split over multiple lines and
|
# %q() is super useful for long strings split over multiple lines and
|
||||||
# is very common in module constructors for things like descriptions
|
# is very common in module constructors for things like descriptions
|
||||||
|
@ -104,11 +130,31 @@ Style/NumericLiterals:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
Description: 'This often hurts readability for exploit-ish code.'
|
Description: 'This often hurts readability for exploit-ish code.'
|
||||||
|
|
||||||
|
Layout/AlignHash:
|
||||||
|
Enabled: false
|
||||||
|
Description: 'aligning info hashes to match these rules is almost impossible to get right'
|
||||||
|
|
||||||
|
Layout/EmptyLines:
|
||||||
|
Enabled: false
|
||||||
|
Description: 'these are used to increase readability'
|
||||||
|
|
||||||
|
Layout/EmptyLinesAroundClassBody:
|
||||||
|
Enabled: false
|
||||||
|
Description: 'these are used to increase readability'
|
||||||
|
|
||||||
|
Layout/EmptyLinesAroundMethodBody:
|
||||||
|
Enabled: false
|
||||||
|
Description: 'these are used to increase readability'
|
||||||
|
|
||||||
Layout/AlignParameters:
|
Layout/AlignParameters:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
EnforcedStyle: 'with_fixed_indentation'
|
EnforcedStyle: 'with_fixed_indentation'
|
||||||
Description: 'initialize method of every module has fixed indentation for Name, Description, etc'
|
Description: 'initialize method of every module has fixed indentation for Name, Description, etc'
|
||||||
|
|
||||||
|
Style/For:
|
||||||
|
Enabled: false
|
||||||
|
Description: 'if a module is written with a for loop, it cannot always be logically replaced with each'
|
||||||
|
|
||||||
Style/StringLiterals:
|
Style/StringLiterals:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
Description: 'Single vs double quote fights are largely unproductive.'
|
Description: 'Single vs double quote fights are largely unproductive.'
|
||||||
|
|
Loading…
Reference in New Issue