Skip to content

Commit 4871492

Browse files
author
Tod Beardsley
committed
Tidy up .rubocopy.yml
This alphabetizes the configuration for rubocop.yml and preps for a rubocop auto-config so we're not constantly hit with warnings.
1 parent 820ea7e commit 4871492

File tree

1 file changed

+35
-11
lines changed

1 file changed

+35
-11
lines changed

.rubocop.yml

Lines changed: 35 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,43 @@
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
1013
Exclude:
11-
# Most modules are quite large and all contained in one class. This is OK.
1214
- 'modules/**/*'
1315

14-
Style/NumericLiterals:
15-
Enabled: false
16-
17-
Documentation:
16+
Style/Documentation:
17+
Enabled: true
18+
Description: 'Most Metasploit modules do not have class documentation.'
1819
Exclude:
1920
- 'modules/**/*'
21+
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+
41+
Style/NumericLiterals:
42+
Enabled: false
43+
Description: 'This often hurts readability for exploit-ish code.'

0 commit comments

Comments
 (0)