.rubocop.yml
AllCops:
TargetRubyVersion: 2.4
Style/ClassAndModuleChildren:
Description: 'Most modules will use the non-nested syntax'
Enabled: false
Style/RegexpLiteral:
Enabled: false
Metrics/ClassLength:
Description: 'Most modules and payloads are quite large. This is ok.'
Enabled: true
Exclude:
- 'lib/wpxf/modules/**/*'
- 'lib/wpxf/payloads/**/*'
Style/Documentation:
Enabled: true
Description: 'Most modules do not have class documentation.'
Exclude:
- 'lib/wpxf/modules/**/*'
Metrics/LineLength:
Description: 'Modules often pattern match against very long strings when identifying targets.'
Enabled: true
Max: 180
Metrics/MethodLength:
Enabled: true
Description: 'While the style guide suggests 10 lines, exploit definitions often exceed 200 lines.'
Max: 300
Style/WordArray:
Enabled: false
Description: 'Prefer consistent use of []'
Style/RedundantBegin:
Exclude:
- 'lib/wpxf/modules/**/*'
Documentation:
Exclude:
- 'lib/wpxf/modules/**/*'
Style/IndentArray:
Enabled: false
Description: 'A lot of modules use a sensible indentation level that Rubocop does not like.'
Lint/UnusedMethodArgument:
Description: 'A number of classes will contain unused parameters for documentation purposes.'
Exclude:
- 'lib/wpxf/**/*'
Style/ConditionalAssignment:
Enabled: false
Description: 'On long lines, this results in really bad formatting issues.'
Style/IfUnlessModifier:
Enabled: false
Description: 'The modifier does not always increase readability.'
Style/ClassVars:
Enabled: false
Description: 'There are genuine use cases for using class vars.'
Metrics/BlockLength:
Enabled: true
Description: 'Some unit tests are going to be naturally long; no need to flag this up.'
Exclude:
- spec/**/*
Layout/EmptyLinesAroundArguments:
Description: 'Produces false positives when using multi-line strings with spaces.'
Exclude:
- 'lib/wpxf/modules/**/*'
Lint/AmbiguousRegexpLiteral:
Enabled: false