Skip to content

[Bug] Recursive functions are reported as a issue #10

@ppipada

Description

@ppipada

If there is a recursive function, it gets reported as func reference XYZ is after definition

E.g:

func DeepCopyValue(value any) any {
	switch v := value.(type) {
	case map[string]any:
		newV := make(map[string]any)
		for k, val := range v {
			newV[k] = DeepCopyValue(val)
		}
		return newV
	case []any:
		sliceCopy := make([]any, len(v))
		for i, elem := range v {
			sliceCopy[i] = DeepCopyValue(elem)
		}
		return sliceCopy
	default:
		return v
	}
}

This will report: func reference DeepCopyValue is after definition

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions