Skip to content

Commit 34a4247

Browse files
committed
Merge branch 'master' of github.com:rapid7/metasploit-framework
2 parents 469ac30 + f25bb73 commit 34a4247

File tree

112 files changed

+5612
-1831
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

112 files changed

+5612
-1831
lines changed

.rubocop.yml

Lines changed: 49 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,58 @@
1-
LineLength:
2-
Enabled: true
3-
Max: 180
1+
# This list was created by analyzing the last three months (51 modules)
2+
# committed to Metasploit Framework. Many, many older modules will have
3+
# offenses, but this should at least provide a baseline for new modules.
4+
#
5+
# Updates to this file should include a 'Description' parameter for
6+
# any explaination needed.
47

5-
MethodLength:
6-
Enabled: true
7-
Max: 100
8+
inherit_from: .rubocop_todo.yml
89

910
Style/ClassLength:
11+
Description: 'Most Metasploit modules are quite large. This is ok.'
12+
Enabled: true
13+
Exclude:
14+
- 'modules/**/*'
15+
16+
Style/Documentation:
17+
Enabled: true
18+
Description: 'Most Metasploit modules do not have class documentation.'
1019
Exclude:
11-
# Most modules are quite large and all contained in one class. This is OK.
1220
- 'modules/**/*'
1321

22+
Style/Encoding:
23+
Enabled: true
24+
Description: 'We prefer binary to UTF-8.'
25+
EnforcedStyle: 'when_needed'
26+
27+
Style/LineLength:
28+
Description: >-
29+
Metasploit modules often pattern match against very
30+
long strings when identifying targets.
31+
Enabled: true
32+
Max: 180
33+
34+
Style/MethodLength:
35+
Enabled: true
36+
Description: >-
37+
While the style guide suggests 10 lines, exploit definitions
38+
often exceed 200 lines.
39+
Max: 300
40+
1441
Style/NumericLiterals:
1542
Enabled: false
43+
Description: 'This often hurts readability for exploit-ish code.'
1644

17-
Documentation:
18-
Exclude:
19-
- 'modules/**/*'
45+
Style/PercentLiteralDelimiters:
46+
Enabled: false
47+
Description: >-
48+
Metasploit devs tend to prefer [] over %w() for
49+
nearly all cases, since we often deal with funny
50+
looking arrays of nonwords. Consistency here is
51+
preferred over element type safety.
52+
53+
Style/WordArray:
54+
Enabled: false
55+
Description: >-
56+
Metasploit devs have grown comforatble with curly
57+
braces over parens for %w. Disabling this check
58+
prefers consistency.

0 commit comments

Comments
 (0)