Skip to content

gci wants to remove comment // ANCHOR_END: Conditions #82

@oscr

Description

@oscr

Hi 👋

When running latest gci on cluster-api I got 3 findings:

api/v1alpha3/condition_types.go:96: File is not `gci`-ed with -skip-generated -s standard,default (gci)

// ANCHOR_END: Conditions
api/v1alpha4/condition_types.go:96: File is not `gci`-ed with -skip-generated -s standard,default (gci)

// ANCHOR_END: Conditions
api/v1beta1/condition_types.go:93: File is not `gci`-ed with -skip-generated -s standard,default (gci)

// ANCHOR_END: Conditions

For example https://github.com/kubernetes-sigs/cluster-api/blob/6bf351bf9d8514267131b14ac80cca6ced2ab271/api/v1alpha3/condition_types.go#L97

Example with debug info enabled

2022-07-19T00:22:06.019+0200	DEBUG	gci/gci.go:116	Loaded File: /home/oscr/go/src/k8s.io/kubernetes-sig/cluster-api/api/v1alpha3/condition_types.go
2022-07-19T00:22:06.019+0200	DEBUG	format/format.go:41	Matched import &{599 627 corev1 k8s.io/api/core/v1} to section default
2022-07-19T00:22:06.019+0200	DEBUG	format/format.go:41	Matched import &{628 674 metav1 k8s.io/apimachinery/pkg/apis/meta/v1} to section default
--- /home/oscr/go/src/k8s.io/kubernetes-sig/cluster-api/api/v1alpha3/condition_types.go
+++ /home/oscr/go/src/k8s.io/kubernetes-sig/cluster-api/api/v1alpha3/condition_types.go
@@ -93,5 +93,3 @@
 
 // Conditions provide observations of the operational state of a Cluster API resource.
 type Conditions []Condition
-
-// ANCHOR_END: Conditions

Are these correct findings?
Is there a way to ignore these findings other than not linting the file?

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