Showing 1,820 of 1,820 total issues
Function skipCa
has 11 return statements (exceeds 4 allowed). Open
func skipCa(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
depth := 0
for iNdEx < l {
Method Service.MarshalToSizedBuffer
has a Cognitive Complexity of 25 (exceeds 20 allowed). Consider refactoring. Open
func (m *Service) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
- 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
Function ConvertExtensionWatch
has a Cognitive Complexity of 25 (exceeds 20 allowed). Consider refactoring. Open
func ConvertExtensionWatch(action WatchActionKind, filters []*SelectBy) ([]Event, error) {
var (
m Extension
checkFuncs []ExtensionCheckFunc
)
- 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
Function ConvertClusterWatch
has a Cognitive Complexity of 25 (exceeds 20 allowed). Consider refactoring. Open
func ConvertClusterWatch(action WatchActionKind, filters []*SelectBy) ([]Event, error) {
var (
m Cluster
checkFuncs []ClusterCheckFunc
)
- 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
Function skipResource
has 11 return statements (exceeds 4 allowed). Open
func skipResource(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
depth := 0
for iNdEx < l {
Function ConvertSecretWatch
has a Cognitive Complexity of 25 (exceeds 20 allowed). Consider refactoring. Open
func ConvertSecretWatch(action WatchActionKind, filters []*SelectBy) ([]Event, error) {
var (
m Secret
checkFuncs []SecretCheckFunc
)
- 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
Function ConvertNetworkWatch
has a Cognitive Complexity of 25 (exceeds 20 allowed). Consider refactoring. Open
func ConvertNetworkWatch(action WatchActionKind, filters []*SelectBy) ([]Event, error) {
var (
m Network
checkFuncs []NetworkCheckFunc
)
- 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
Function ConvertVolumeWatch
has a Cognitive Complexity of 25 (exceeds 20 allowed). Consider refactoring. Open
func ConvertVolumeWatch(action WatchActionKind, filters []*SelectBy) ([]Event, error) {
var (
m Volume
checkFuncs []VolumeCheckFunc
)
- 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
Function ConvertResourceWatch
has a Cognitive Complexity of 25 (exceeds 20 allowed). Consider refactoring. Open
func ConvertResourceWatch(action WatchActionKind, filters []*SelectBy, kind string) ([]Event, error) {
var (
m Resource
checkFuncs []ResourceCheckFunc
)
- 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
Function ConvertServiceWatch
has a Cognitive Complexity of 25 (exceeds 20 allowed). Consider refactoring. Open
func ConvertServiceWatch(action WatchActionKind, filters []*SelectBy) ([]Event, error) {
var (
m Service
checkFuncs []ServiceCheckFunc
)
- 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
Function skipDispatcher
has 11 return statements (exceeds 4 allowed). Open
func skipDispatcher(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
depth := 0
for iNdEx < l {
Method StoreSnapshot.MarshalToSizedBuffer
has 11 return statements (exceeds 4 allowed). Open
func (m *StoreSnapshot) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
Function skipSnapshot
has 11 return statements (exceeds 4 allowed). Open
func skipSnapshot(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
depth := 0
for iNdEx < l {
Function skipObjects
has 11 return statements (exceeds 4 allowed). Open
func skipObjects(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
depth := 0
for iNdEx < l {
Function skipLogbroker
has 11 return statements (exceeds 4 allowed). Open
func skipLogbroker(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
depth := 0
for iNdEx < l {
Method ContainerSpec.MarshalToSizedBuffer
has 11 return statements (exceeds 4 allowed). Open
func (m *ContainerSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
Function skipSpecs
has 11 return statements (exceeds 4 allowed). Open
func skipSpecs(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
depth := 0
for iNdEx < l {
Function skipWatch
has 11 return statements (exceeds 4 allowed). Open
func skipWatch(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
depth := 0
for iNdEx < l {
Function skipPlugin
has 11 return statements (exceeds 4 allowed). Open
func skipPlugin(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
depth := 0
for iNdEx < l {
Method Updater.updateTask
has 11 return statements (exceeds 4 allowed). Open
func (u *Updater) updateTask(ctx context.Context, slot orchestrator.Slot, updated *api.Task, order api.UpdateConfig_UpdateOrder) error {
// Kick off the watch before even creating the updated task. This is in order to avoid missing any event.
taskUpdates, cancel := state.Watch(u.watchQueue, api.EventUpdateTask{
Task: &api.Task{ID: updated.ID},
Checks: []api.TaskCheckFunc{api.TaskCheckID},