Skip to content

Commit b55bf50

Browse files
committed
πŸ§‘β€πŸ’» REEK HAS FOUND SMELLS
1 parent ed0a26a commit b55bf50

File tree

1 file changed

+128
-0
lines changed

1 file changed

+128
-0
lines changed

β€ŽREEKβ€Ž

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
spec/oauth2/access_token_spec.rb -- 1 warning:
2+
[292, 293]:DuplicateMethodCall: assert_initialized_token calls 'target.params' 2 times [https://github.com/troessner/reek/blob/v6.5.0/docs/Duplicate-Method-Call.md]
3+
spec/oauth2/client_spec.rb -- 3 warnings:
4+
[1075]:UnusedParameters: initialize has unused parameter 'client' [https://github.com/troessner/reek/blob/v6.5.0/docs/Unused-Parameters.md]
5+
[1075]:UnusedParameters: initialize has unused parameter 'hash' [https://github.com/troessner/reek/blob/v6.5.0/docs/Unused-Parameters.md]
6+
[1211]:UtilityFunction: stubbed_client doesn't depend on instance state (maybe move it to another class?) [https://github.com/troessner/reek/blob/v6.5.0/docs/Utility-Function.md]
7+
spec/oauth2/error_spec.rb -- 3 warnings:
8+
[10]:IrresponsibleModule: XmledString has no descriptive comment [https://github.com/troessner/reek/blob/v6.5.0/docs/Irresponsible-Module.md]
9+
[4]:SubclassedFromCoreClass: StirredHash inherits from core class 'Hash' [https://github.com/troessner/reek/blob/v6.5.0/docs/Subclassed-From-Core-Class.md]
10+
[10]:SubclassedFromCoreClass: XmledString inherits from core class 'String' [https://github.com/troessner/reek/blob/v6.5.0/docs/Subclassed-From-Core-Class.md]
11+
lib/oauth2/access_token.rb -- 24 warnings:
12+
[12]:Attribute: OAuth2::AccessToken#options is a writable attribute [https://github.com/troessner/reek/blob/v6.5.0/docs/Attribute.md]
13+
[12]:Attribute: OAuth2::AccessToken#refresh_token is a writable attribute [https://github.com/troessner/reek/blob/v6.5.0/docs/Attribute.md]
14+
[12]:Attribute: OAuth2::AccessToken#response is a writable attribute [https://github.com/troessner/reek/blob/v6.5.0/docs/Attribute.md]
15+
[302, 310, 317, 324, 331, 338]:DataClump: OAuth2::AccessToken takes parameters ['opts', 'path'] to 6 methods [https://github.com/troessner/reek/blob/v6.5.0/docs/Data-Clump.md]
16+
[350, 366]:DuplicateMethodCall: OAuth2::AccessToken#configure_authentication! calls 'options[:mode]' 2 times [https://github.com/troessner/reek/blob/v6.5.0/docs/Duplicate-Method-Call.md]
17+
[356, 360, 362]:DuplicateMethodCall: OAuth2::AccessToken#configure_authentication! calls 'options[:param_name]' 3 times [https://github.com/troessner/reek/blob/v6.5.0/docs/Duplicate-Method-Call.md]
18+
[358, 359, 360, 362]:DuplicateMethodCall: OAuth2::AccessToken#configure_authentication! calls 'opts[:body]' 4 times [https://github.com/troessner/reek/blob/v6.5.0/docs/Duplicate-Method-Call.md]
19+
[352, 353]:DuplicateMethodCall: OAuth2::AccessToken#configure_authentication! calls 'opts[:headers]' 2 times [https://github.com/troessner/reek/blob/v6.5.0/docs/Duplicate-Method-Call.md]
20+
[355, 356]:DuplicateMethodCall: OAuth2::AccessToken#configure_authentication! calls 'opts[:params]' 2 times [https://github.com/troessner/reek/blob/v6.5.0/docs/Duplicate-Method-Call.md]
21+
[4]:InstanceVariableAssumption: OAuth2::AccessToken assumes too much for instance variable '@refresh_token' [https://github.com/troessner/reek/blob/v6.5.0/docs/Instance-Variable-Assumption.md]
22+
[4]:IrresponsibleModule: OAuth2::AccessToken has no descriptive comment [https://github.com/troessner/reek/blob/v6.5.0/docs/Irresponsible-Module.md]
23+
[349]:MissingSafeMethod: OAuth2::AccessToken has missing safe method 'configure_authentication!' [https://github.com/troessner/reek/blob/v6.5.0/docs/Missing-Safe-Method.md]
24+
[125, 125]:NilCheck: OAuth2::AccessToken#initialize performs a nil-check [https://github.com/troessner/reek/blob/v6.5.0/docs/Nil-Check.md]
25+
[244]:NilCheck: OAuth2::AccessToken#revoke performs a nil-check [https://github.com/troessner/reek/blob/v6.5.0/docs/Nil-Check.md]
26+
[4]:TooManyInstanceVariables: OAuth2::AccessToken has at least 7 instance variables [https://github.com/troessner/reek/blob/v6.5.0/docs/Too-Many-Instance-Variables.md]
27+
[4]:TooManyMethods: OAuth2::AccessToken has at least 20 methods [https://github.com/troessner/reek/blob/v6.5.0/docs/Too-Many-Methods.md]
28+
[349]:TooManyStatements: OAuth2::AccessToken#configure_authentication! has approx 8 statements [https://github.com/troessner/reek/blob/v6.5.0/docs/Too-Many-Statements.md]
29+
[42]:TooManyStatements: OAuth2::AccessToken#from_hash has approx 10 statements [https://github.com/troessner/reek/blob/v6.5.0/docs/Too-Many-Statements.md]
30+
[185]:TooManyStatements: OAuth2::AccessToken#refresh has approx 7 statements [https://github.com/troessner/reek/blob/v6.5.0/docs/Too-Many-Statements.md]
31+
[234]:TooManyStatements: OAuth2::AccessToken#revoke has approx 13 statements [https://github.com/troessner/reek/blob/v6.5.0/docs/Too-Many-Statements.md]
32+
[3]:UncommunicativeModuleName: OAuth2 has the name 'OAuth2' [https://github.com/troessner/reek/blob/v6.5.0/docs/Uncommunicative-Module-Name.md]
33+
[281]:UncommunicativeVariableName: OAuth2::AccessToken#to_hash has the variable name 'k' [https://github.com/troessner/reek/blob/v6.5.0/docs/Uncommunicative-Variable-Name.md]
34+
[281]:UncommunicativeVariableName: OAuth2::AccessToken#to_hash has the variable name 'v' [https://github.com/troessner/reek/blob/v6.5.0/docs/Uncommunicative-Variable-Name.md]
35+
[370]:UtilityFunction: OAuth2::AccessToken#convert_expires_at doesn't depend on instance state (maybe move it to another class?) [https://github.com/troessner/reek/blob/v6.5.0/docs/Utility-Function.md]
36+
lib/oauth2/authenticator.rb -- 5 warnings:
37+
[68, 70]:FeatureEnvy: OAuth2::Authenticator#apply_basic_auth refers to 'params' more than self (maybe move it to another class?) [https://github.com/troessner/reek/blob/v6.5.0/docs/Feature-Envy.md]
38+
[6]:IrresponsibleModule: OAuth2::Authenticator has no descriptive comment [https://github.com/troessner/reek/blob/v6.5.0/docs/Irresponsible-Module.md]
39+
[61]:NilCheck: OAuth2::Authenticator#apply_client_id performs a nil-check [https://github.com/troessner/reek/blob/v6.5.0/docs/Nil-Check.md]
40+
[52, 53]:NilCheck: OAuth2::Authenticator#apply_params_auth performs a nil-check [https://github.com/troessner/reek/blob/v6.5.0/docs/Nil-Check.md]
41+
[5]:UncommunicativeModuleName: OAuth2 has the name 'OAuth2' [https://github.com/troessner/reek/blob/v6.5.0/docs/Uncommunicative-Module-Name.md]
42+
lib/oauth2/client.rb -- 28 warnings:
43+
[28]:Attribute: OAuth2::Client#connection is a writable attribute [https://github.com/troessner/reek/blob/v6.5.0/docs/Attribute.md]
44+
[27]:Attribute: OAuth2::Client#options is a writable attribute [https://github.com/troessner/reek/blob/v6.5.0/docs/Attribute.md]
45+
[208, 469, 536]:DataClump: OAuth2::Client takes parameters ['access_token_opts', 'extract_access_token'] to 3 methods [https://github.com/troessner/reek/blob/v6.5.0/docs/Data-Clump.md]
46+
[469, 492, 517, 536]:DataClump: OAuth2::Client takes parameters ['access_token_opts', 'response'] to 4 methods [https://github.com/troessner/reek/blob/v6.5.0/docs/Data-Clump.md]
47+
[89, 90]:DuplicateMethodCall: OAuth2::Client#connection calls 'options[:connection_build]' 2 times [https://github.com/troessner/reek/blob/v6.5.0/docs/Duplicate-Method-Call.md]
48+
[433, 433]:DuplicateMethodCall: OAuth2::Client#execute_request calls 'req_opts[:params]' 2 times [https://github.com/troessner/reek/blob/v6.5.0/docs/Duplicate-Method-Call.md]
49+
[336, 337]:DuplicateMethodCall: OAuth2::Client#redirection_params calls 'options[:redirect_uri]' 2 times [https://github.com/troessner/reek/blob/v6.5.0/docs/Duplicate-Method-Call.md]
50+
[152, 153, 154]:DuplicateMethodCall: OAuth2::Client#request calls 'req_opts[:redirect_count]' 3 times [https://github.com/troessner/reek/blob/v6.5.0/docs/Duplicate-Method-Call.md]
51+
[260, 261, 262]:DuplicateMethodCall: OAuth2::Client#revoke_token calls 'req_opts[:params]' 3 times [https://github.com/troessner/reek/blob/v6.5.0/docs/Duplicate-Method-Call.md]
52+
[519, 519]:FeatureEnvy: OAuth2::Client#build_access_token refers to 'access_token' more than self (maybe move it to another class?) [https://github.com/troessner/reek/blob/v6.5.0/docs/Feature-Envy.md]
53+
[354, 357, 363, 365, 366, 368]:FeatureEnvy: OAuth2::Client#params_to_req_opts refers to 'req_opts' more than self (maybe move it to another class?) [https://github.com/troessner/reek/blob/v6.5.0/docs/Feature-Envy.md]
54+
[388, 395, 395, 396, 396, 397, 397, 400]:FeatureEnvy: OAuth2::Client#parse_snaky_params_headers refers to 'params' more than self (maybe move it to another class?) [https://github.com/troessner/reek/blob/v6.5.0/docs/Feature-Envy.md]
55+
[16]:IrresponsibleModule: OAuth2::ConnectionError has no descriptive comment [https://github.com/troessner/reek/blob/v6.5.0/docs/Irresponsible-Module.md]
56+
[17]:IrresponsibleModule: OAuth2::TimeoutError has no descriptive comment [https://github.com/troessner/reek/blob/v6.5.0/docs/Irresponsible-Module.md]
57+
[519]:ManualDispatch: OAuth2::Client#build_access_token manually dispatches method call [https://github.com/troessner/reek/blob/v6.5.0/docs/Manual-Dispatch.md]
58+
[20]:TooManyInstanceVariables: OAuth2::Client has at least 5 instance variables [https://github.com/troessner/reek/blob/v6.5.0/docs/Too-Many-Instance-Variables.md]
59+
[20]:TooManyMethods: OAuth2::Client has at least 25 methods [https://github.com/troessner/reek/blob/v6.5.0/docs/Too-Many-Methods.md]
60+
[424]:TooManyStatements: OAuth2::Client#execute_request has approx 16 statements [https://github.com/troessner/reek/blob/v6.5.0/docs/Too-Many-Statements.md]
61+
[208]:TooManyStatements: OAuth2::Client#get_token has approx 6 statements [https://github.com/troessner/reek/blob/v6.5.0/docs/Too-Many-Statements.md]
62+
[346]:TooManyStatements: OAuth2::Client#params_to_req_opts has approx 9 statements [https://github.com/troessner/reek/blob/v6.5.0/docs/Too-Many-Statements.md]
63+
[492]:TooManyStatements: OAuth2::Client#parse_response has approx 6 statements [https://github.com/troessner/reek/blob/v6.5.0/docs/Too-Many-Statements.md]
64+
[387]:TooManyStatements: OAuth2::Client#parse_snaky_params_headers has approx 11 statements [https://github.com/troessner/reek/blob/v6.5.0/docs/Too-Many-Statements.md]
65+
[146]:TooManyStatements: OAuth2::Client#request has approx 18 statements [https://github.com/troessner/reek/blob/v6.5.0/docs/Too-Many-Statements.md]
66+
[257]:TooManyStatements: OAuth2::Client#revoke_token has approx 6 statements [https://github.com/troessner/reek/blob/v6.5.0/docs/Too-Many-Statements.md]
67+
[15]:UncommunicativeModuleName: OAuth2 has the name 'OAuth2' [https://github.com/troessner/reek/blob/v6.5.0/docs/Uncommunicative-Module-Name.md]
68+
[436, 438]:UncommunicativeVariableName: OAuth2::Client#execute_request has the variable name 'e' [https://github.com/troessner/reek/blob/v6.5.0/docs/Uncommunicative-Variable-Name.md]
69+
[428]:UncommunicativeVariableName: OAuth2::Client#execute_request has the variable name 'k' [https://github.com/troessner/reek/blob/v6.5.0/docs/Uncommunicative-Variable-Name.md]
70+
[429]:UncommunicativeVariableName: OAuth2::Client#execute_request has the variable name 'p' [https://github.com/troessner/reek/blob/v6.5.0/docs/Uncommunicative-Variable-Name.md]
71+
lib/oauth2/error.rb -- 8 warnings:
72+
[35, 35, 37, 38]:DuplicateMethodCall: OAuth2::Error#error_message calls 'opts[:error_description]' 4 times [https://github.com/troessner/reek/blob/v6.5.0/docs/Duplicate-Method-Call.md]
73+
[13, 14, 15]:DuplicateMethodCall: OAuth2::Error#initialize calls 'response.parsed' 3 times [https://github.com/troessner/reek/blob/v6.5.0/docs/Duplicate-Method-Call.md]
74+
[4]:IrresponsibleModule: OAuth2::Error has no descriptive comment [https://github.com/troessner/reek/blob/v6.5.0/docs/Irresponsible-Module.md]
75+
[37, 37]:ManualDispatch: OAuth2::Error#error_message manually dispatches method call [https://github.com/troessner/reek/blob/v6.5.0/docs/Manual-Dispatch.md]
76+
[12, 21]:ManualDispatch: OAuth2::Error#initialize manually dispatches method call [https://github.com/troessner/reek/blob/v6.5.0/docs/Manual-Dispatch.md]
77+
[32]:TooManyStatements: OAuth2::Error#error_message has approx 7 statements [https://github.com/troessner/reek/blob/v6.5.0/docs/Too-Many-Statements.md]
78+
[3]:UncommunicativeModuleName: OAuth2 has the name 'OAuth2' [https://github.com/troessner/reek/blob/v6.5.0/docs/Uncommunicative-Module-Name.md]
79+
[32]:UtilityFunction: OAuth2::Error#error_message doesn't depend on instance state (maybe move it to another class?) [https://github.com/troessner/reek/blob/v6.5.0/docs/Utility-Function.md]
80+
lib/oauth2/filtered_attributes.rb -- 6 warnings:
81+
[18, 28]:DuplicateMethodCall: OAuth2::FilteredAttributes#inspect calls 'self.class' 2 times [https://github.com/troessner/reek/blob/v6.5.0/docs/Duplicate-Method-Call.md]
82+
[2]:IrresponsibleModule: OAuth2::FilteredAttributes has no descriptive comment [https://github.com/troessner/reek/blob/v6.5.0/docs/Irresponsible-Module.md]
83+
[7]:IrresponsibleModule: OAuth2::FilteredAttributes::ClassMethods has no descriptive comment [https://github.com/troessner/reek/blob/v6.5.0/docs/Irresponsible-Module.md]
84+
[22]:NestedIterators: OAuth2::FilteredAttributes#inspect contains iterators nested 2 deep [https://github.com/troessner/reek/blob/v6.5.0/docs/Nested-Iterators.md]
85+
[17]:TooManyStatements: OAuth2::FilteredAttributes#inspect has approx 7 statements [https://github.com/troessner/reek/blob/v6.5.0/docs/Too-Many-Statements.md]
86+
[1]:UncommunicativeModuleName: OAuth2 has the name 'OAuth2' [https://github.com/troessner/reek/blob/v6.5.0/docs/Uncommunicative-Module-Name.md]
87+
lib/oauth2/response.rb -- 12 warnings:
88+
[15]:Attribute: OAuth2::Response#options is a writable attribute [https://github.com/troessner/reek/blob/v6.5.0/docs/Attribute.md]
89+
[51]:BooleanParameter: OAuth2::Response#initialize has boolean parameter 'snaky' [https://github.com/troessner/reek/blob/v6.5.0/docs/Boolean-Parameter.md]
90+
[25, 39, 134]:ClassVariable: OAuth2::Response declares the class variable '@@content_types' [https://github.com/troessner/reek/blob/v6.5.0/docs/Class-Variable.md]
91+
[19, 37, 131, 134]:ClassVariable: OAuth2::Response declares the class variable '@@parsers' [https://github.com/troessner/reek/blob/v6.5.0/docs/Class-Variable.md]
92+
[103, 105]:DuplicateMethodCall: OAuth2::Response#content_type calls 'response.headers' 2 times [https://github.com/troessner/reek/blob/v6.5.0/docs/Duplicate-Method-Call.md]
93+
[128, 129, 130, 131]:DuplicateMethodCall: OAuth2::Response#parser calls 'options[:parse]' 4 times [https://github.com/troessner/reek/blob/v6.5.0/docs/Duplicate-Method-Call.md]
94+
[9]:InstanceVariableAssumption: OAuth2::Response assumes too much for instance variable '@parsed' [https://github.com/troessner/reek/blob/v6.5.0/docs/Instance-Variable-Assumption.md]
95+
[9]:InstanceVariableAssumption: OAuth2::Response assumes too much for instance variable '@parser' [https://github.com/troessner/reek/blob/v6.5.0/docs/Instance-Variable-Assumption.md]
96+
[82]:ManualDispatch: OAuth2::Response#parsed manually dispatches method call [https://github.com/troessner/reek/blob/v6.5.0/docs/Manual-Dispatch.md]
97+
[128]:ManualDispatch: OAuth2::Response#parser manually dispatches method call [https://github.com/troessner/reek/blob/v6.5.0/docs/Manual-Dispatch.md]
98+
[78]:TooManyStatements: OAuth2::Response#parsed has approx 7 statements [https://github.com/troessner/reek/blob/v6.5.0/docs/Too-Many-Statements.md]
99+
[7]:UncommunicativeModuleName: OAuth2 has the name 'OAuth2' [https://github.com/troessner/reek/blob/v6.5.0/docs/Uncommunicative-Module-Name.md]
100+
lib/oauth2/strategy/assertion.rb -- 5 warnings:
101+
[96, 96, 98, 98]:FeatureEnvy: OAuth2::Strategy::Assertion#build_assertion refers to 'encoding_opts' more than self (maybe move it to another class?) [https://github.com/troessner/reek/blob/v6.5.0/docs/Feature-Envy.md]
102+
[32]:InstanceVariableAssumption: OAuth2::Strategy::Assertion assumes too much for instance variable '@client' [https://github.com/troessner/reek/blob/v6.5.0/docs/Instance-Variable-Assumption.md]
103+
[79]:LongParameterList: OAuth2::Strategy::Assertion#get_token has 4 parameters [https://github.com/troessner/reek/blob/v6.5.0/docs/Long-Parameter-List.md]
104+
[5]:UncommunicativeModuleName: OAuth2 has the name 'OAuth2' [https://github.com/troessner/reek/blob/v6.5.0/docs/Uncommunicative-Module-Name.md]
105+
[88]:UtilityFunction: OAuth2::Strategy::Assertion#build_request doesn't depend on instance state (maybe move it to another class?) [https://github.com/troessner/reek/blob/v6.5.0/docs/Utility-Function.md]
106+
lib/oauth2/strategy/auth_code.rb -- 3 warnings:
107+
[43, 43]:FeatureEnvy: OAuth2::Strategy::AuthCode#assert_valid_params refers to 'params' more than self (maybe move it to another class?) [https://github.com/troessner/reek/blob/v6.5.0/docs/Feature-Envy.md]
108+
[8]:InstanceVariableAssumption: OAuth2::Strategy::AuthCode assumes too much for instance variable '@client' [https://github.com/troessner/reek/blob/v6.5.0/docs/Instance-Variable-Assumption.md]
109+
[3]:UncommunicativeModuleName: OAuth2 has the name 'OAuth2' [https://github.com/troessner/reek/blob/v6.5.0/docs/Uncommunicative-Module-Name.md]
110+
lib/oauth2/strategy/base.rb -- 2 warnings:
111+
[5]:IrresponsibleModule: OAuth2::Strategy::Base has no descriptive comment [https://github.com/troessner/reek/blob/v6.5.0/docs/Irresponsible-Module.md]
112+
[3]:UncommunicativeModuleName: OAuth2 has the name 'OAuth2' [https://github.com/troessner/reek/blob/v6.5.0/docs/Uncommunicative-Module-Name.md]
113+
lib/oauth2/strategy/client_credentials.rb -- 2 warnings:
114+
[8]:InstanceVariableAssumption: OAuth2::Strategy::ClientCredentials assumes too much for instance variable '@client' [https://github.com/troessner/reek/blob/v6.5.0/docs/Instance-Variable-Assumption.md]
115+
[3]:UncommunicativeModuleName: OAuth2 has the name 'OAuth2' [https://github.com/troessner/reek/blob/v6.5.0/docs/Uncommunicative-Module-Name.md]
116+
lib/oauth2/strategy/implicit.rb -- 3 warnings:
117+
[34, 34]:FeatureEnvy: OAuth2::Strategy::Implicit#assert_valid_params refers to 'params' more than self (maybe move it to another class?) [https://github.com/troessner/reek/blob/v6.5.0/docs/Feature-Envy.md]
118+
[8]:InstanceVariableAssumption: OAuth2::Strategy::Implicit assumes too much for instance variable '@client' [https://github.com/troessner/reek/blob/v6.5.0/docs/Instance-Variable-Assumption.md]
119+
[3]:UncommunicativeModuleName: OAuth2 has the name 'OAuth2' [https://github.com/troessner/reek/blob/v6.5.0/docs/Uncommunicative-Module-Name.md]
120+
lib/oauth2/strategy/password.rb -- 3 warnings:
121+
[8]:InstanceVariableAssumption: OAuth2::Strategy::Password assumes too much for instance variable '@client' [https://github.com/troessner/reek/blob/v6.5.0/docs/Instance-Variable-Assumption.md]
122+
[21]:LongParameterList: OAuth2::Strategy::Password#get_token has 4 parameters [https://github.com/troessner/reek/blob/v6.5.0/docs/Long-Parameter-List.md]
123+
[3]:UncommunicativeModuleName: OAuth2 has the name 'OAuth2' [https://github.com/troessner/reek/blob/v6.5.0/docs/Uncommunicative-Module-Name.md]
124+
lib/oauth2/version.rb -- 1 warning:
125+
[3]:UncommunicativeModuleName: OAuth2 has the name 'OAuth2' [https://github.com/troessner/reek/blob/v6.5.0/docs/Uncommunicative-Module-Name.md]
126+
lib/oauth2.rb -- 1 warning:
127+
[27]:UncommunicativeModuleName: OAuth2 has the name 'OAuth2' [https://github.com/troessner/reek/blob/v6.5.0/docs/Uncommunicative-Module-Name.md]
128+
110 total warnings

0 commit comments

Comments
Β (0)