-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
.rubocop.yml
144 lines (121 loc) · 3.82 KB
/
.rubocop.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
AllCops:
SuggestExtensions: false
TargetRubyVersion: 3.0
inherit_gem:
rubocop-ronin: rubocop.yml
Style/CommentedKeyword: { Enabled: false }
Style/ArgumentsForwarding: { Enabled: false }
Style/WhileUntilModifier: { Enabled: false }
#
# ronin-support specific exceptions
#
# it makes sense to use octal numbers when testing the file's mode
Style/NumericLiteralPrefix:
Exclude:
- 'lib/ronin/support/archive/tar/writer.rb'
- 'lib/ronin/support/network/ssl/local_key.rb'
- 'lib/ronin/support/network/ssl/local_cert.rb'
- 'spec/archive/tar/writer_spec.rb'
- 'spec/network/ssl/local_cert_spec.rb'
- 'spec/network/ssl/local_key_spec.rb'
# in certain specs we need to use an empty block
Lint/EmptyBlock:
Exclude:
- 'spec/archive/zip/reader_spec.rb'
- 'spec/network/proxy_spec.rb'
Lint/RaiseException:
Exclude:
- 'spec/core_ext/kernel_spec.rb'
# the arrays of Floats need to be organized into rows of columns
Layout/ArrayAlignment:
Exclude:
- 'spec/binary/unhexdump/parser_spec.rb'
# the arrays of Floats need to be organized into rows of columns
Layout/ExtraSpacing:
Exclude:
- 'spec/binary/unhexdump/parser_spec.rb'
# make an exception for required block keyword arguments.
Layout/SpaceAroundBlockParameters:
Exclude:
- 'spec/binary/unhexdump/parser_spec.rb'
# robucop mistakes :x86_64 for a "symbol number"
Naming/VariableNumber:
AllowedIdentifiers:
- x86_64
# OpenSSL TLS version symbols
- TLSv1
- TLSv1_1
- TLSv1_2
# rubocop does not support constants that contain multiple numbers
Naming/ClassAndModuleCamelCase:
AllowedNames:
- X86_64
# we need to test Ronin::Support::Binary::CString#+ does not modify itself
Lint/Void:
Exclude:
- 'spec/binary/cstring_spec.rb'
Style/Documentation:
Exclude:
# ignore top-level documentation for core-ext classes
- 'lib/ronin/support/**/core_ext/**/*.rb'
# BUG: Ronin::Support::Crypto is already documented in lib/ronin/support/crypto.rb
- 'lib/ronin/support/crypto/cert.rb'
- 'lib/ronin/support/crypto/key.rb'
# BUG: Ronin::Support::Binary is already documented in lib/ronin/support/binary.rb
- 'lib/ronin/support/binary/struct.rb'
# make an exception for Coercion() style methods
Naming/MethodName:
Exclude:
- 'lib/ronin/support/crypto/key.rb'
- 'lib/ronin/support/crypto/cert.rb'
Naming/MethodParameterName:
AllowedNames:
- n
- id
- ip
- io
- iv
- os
- to
- ca
# prefer to keep `self.user_agent` a method
Style/TrivialAccessors:
Exclude:
- 'lib/ronin/support/network/http.rb'
# we need to redefine the public-key component methods as public
Lint/UselessMethodDefinition:
Exclude:
- 'lib/ronin/support/crypto/key/dh.rb'
- 'lib/ronin/support/crypto/key/dsa.rb'
- 'lib/ronin/support/crypto/key/rsa.rb'
Naming/BinaryOperatorParameterName:
Exclude:
- 'lib/ronin/support/binary/memory.rb'
# Kernel#try explicitly rescues all exceptions
Lint/RescueException:
Exclude:
- 'lib/ronin/support/core_ext/kernel.rb'
# make an exception when we need to test the #each method directly
Style/MapIntoArray:
Exclude:
- 'spec/archive/zip/reader_spec.rb'
- 'spec/network/ip_range/cidr_spec.rb'
- 'spec/network/ip_range/glob_spec.rb'
- 'spec/network/ip_range_spec.rb'
Style/CaseEquality:
Exclude:
- 'lib/ronin/support/network/ip_range.rb'
- 'spec/network/ip_range_spec.rb'
- 'spec/network/ip_range/cidr_spec.rb'
- 'spec/network/ip_range/glob_spec.rb'
- 'spec/network/ip_range/range_spec.rb'
Style/ConditionalAssignment:
Exclude:
# BUG: this seems like a bug in rubocop
- 'lib/ronin/support/network/ip_range.rb'
Layout/IndentationConsistency:
Exclude:
# BUG: this seems like a bug in rubocop
- 'lib/ronin/support/network/ssl.rb'
# BUG: this seems like a bug in rubocop
- 'lib/ronin/support/network/http.rb'