internal/plugin/connectors/tcp/mysql/authentication_handshake.go
Method AuthenticationHandshake.handleBackendAuthResponse
has a Cognitive Complexity of 38 (exceeds 20 allowed). Consider refactoring. Open
Open
func (h *AuthenticationHandshake) handleBackendAuthResponse() {
if h.err != nil {
return
}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method AuthenticationHandshake.handleBackendAuthResponse
has 87 lines of code (exceeds 70 allowed). Consider refactoring. Open
Open
func (h *AuthenticationHandshake) handleBackendAuthResponse() {
if h.err != nil {
return
}
Method AuthenticationHandshake.handleBackendAuthResponse
has 17 return statements (exceeds 7 allowed). Open
Open
func (h *AuthenticationHandshake) handleBackendAuthResponse() {
if h.err != nil {
return
}
TODO found Open
Open
// TODO: add tests cases for client secure connection
- Exclude checks
TODO found Open
Open
//TODO: after kumbi's work these 2 should be combined
- Exclude checks
TODO found Open
Open
// TODO: update this after kumbi's work
- Exclude checks
TODO found Open
Open
// TODO: We should probably be carrying out a comprehensive unpacking, so that
- Exclude checks
TODO found Open
Open
// TODO: explore weird heisenbug when this is toggled off: ERROR: 1043 (08S01): Bad handshake
- Exclude checks
TODO found Open
Open
// TODO: client requesting SSL results in ERROR 2026 (HY000): SSL connection error: protocol version mismatch
- Exclude checks
TODO found Open
Open
// TODO: Note currently just repeating this logic. Will change after kumbi integration
- Exclude checks
TODO found Open
Open
// TODO: after kumbi's done, change below to method calls
- Exclude checks
TODO found Open
Open
// TODO: add tests cases for authentication plugins support
- Exclude checks
TODO found Open
Open
// TODO: push all packing code into the `WriteXXX` methods
- Exclude checks
TODO found Open
Open
// TODO: change this to method call on clientHandshakeResponse when Kumbi's work done
- Exclude checks