Skip to content

Commit fd8d411

Browse files
(Follow up of : kubernetes-sigs#4752 - Upgrade GolangCI) - fix: remove command to ignore lll in api/ dir
1 parent aae1034 commit fd8d411

File tree

23 files changed

+114
-29
lines changed

23 files changed

+114
-29
lines changed

docs/book/src/cronjob-tutorial/testdata/project/.golangci.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ linters:
2929
exclusions:
3030
generated: lax
3131
rules:
32-
- linters:
33-
- lll
34-
path: api/*
3532
- linters:
3633
- dupl
3734
- lll

docs/book/src/cronjob-tutorial/testdata/project/api/v1/cronjob_types.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ import (
5757
this.
5858
5959
We'll use several markers (`// +comment`) to specify additional metadata. These
60-
will be used by [controller-tools](https://github.com/kubernetes-sigs/controller-tools) when generating our CRD manifest.
60+
will be used by [controller-tools](https://github.com/kubernetes-sigs/controller-tools)
61+
when generating our CRD manifest.
62+
6163
As we'll see in a bit, controller-tools will also use GoDoc to form descriptions for
6264
the fields.
6365
*/

docs/book/src/getting-started/testdata/project/.golangci.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ linters:
2929
exclusions:
3030
generated: lax
3131
rules:
32-
- linters:
33-
- lll
34-
path: api/*
3532
- linters:
3633
- dupl
3734
- lll

docs/book/src/multiversion-tutorial/testdata/project/.golangci.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ linters:
2929
exclusions:
3030
generated: lax
3131
rules:
32-
- linters:
33-
- lll
34-
path: api/*
3532
- linters:
3633
- dupl
3734
- lll

hack/docs/internal/cronjob-tutorial/api_design.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ const cronjobSpecExplaination = `
4343
this.
4444
4545
We'll use several markers (` + "`" + `// +comment` + "`" + `) to specify additional metadata. These
46-
will be used by [controller-tools](https://github.com/kubernetes-sigs/controller-tools) when generating our CRD manifest.
46+
will be used by [controller-tools](https://github.com/kubernetes-sigs/controller-tools)
47+
when generating our CRD manifest.
48+
4749
As we'll see in a bit, controller-tools will also use GoDoc to form descriptions for
4850
the fields.
4951
*/

hack/docs/internal/multiversion-tutorial/cronjob_v1.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ const cronjobSpecComment = `/*
3939
this.
4040
4141
We'll use several markers (` + "`// +comment`" + `) to specify additional metadata. These
42-
will be used by [controller-tools](https://github.com/kubernetes-sigs/controller-tools) when generating our CRD manifest.
42+
will be used by [controller-tools](https://github.com/kubernetes-sigs/controller-tools)
43+
when generating our CRD manifest.
44+
4345
As we'll see in a bit, controller-tools will also use GoDoc to form descriptions for
4446
the fields.
4547
*/`

pkg/plugins/golang/deploy-image/v1alpha1/scaffolds/internal/templates/api/types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ type {{ .Resource.Kind }}Spec struct {
9292
9393
// {{ .Resource.Kind }}Status defines the observed state of {{ .Resource.Kind }}
9494
type {{ .Resource.Kind }}Status struct {
95+
// nolint:lll
9596
// Represents the observations of a {{ .Resource.Kind }}'s current state.
9697
// {{ .Resource.Kind }}.status.conditions.type are: "Available", "Progressing", and "Degraded"
9798
// {{ .Resource.Kind }}.status.conditions.status are one of True, False, Unknown.
@@ -100,7 +101,6 @@ type {{ .Resource.Kind }}Status struct {
100101
// are considered a guaranteed API.
101102
// {{ .Resource.Kind }}.status.conditions.Message is a human readable message indicating details about the transition.
102103
// For further information see: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties
103-
104104
Conditions []metav1.Condition ` + "`" + `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"` + "`" + `
105105
}
106106

pkg/plugins/golang/v4/scaffolds/internal/templates/golangci.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,6 @@ linters:
7272
exclusions:
7373
generated: lax
7474
rules:
75-
- linters:
76-
- lll
77-
path: api/*
7875
- linters:
7976
- dupl
8077
- lll

testdata/project-v4-multigroup/.golangci.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ linters:
2929
exclusions:
3030
generated: lax
3131
rules:
32-
- linters:
33-
- lll
34-
path: api/*
3532
- linters:
3633
- dupl
3734
- lll

testdata/project-v4-multigroup/api/example.com/v1alpha1/busybox_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ type BusyboxSpec struct {
3939

4040
// BusyboxStatus defines the observed state of Busybox
4141
type BusyboxStatus struct {
42+
// nolint:lll
4243
// Represents the observations of a Busybox's current state.
4344
// Busybox.status.conditions.type are: "Available", "Progressing", and "Degraded"
4445
// Busybox.status.conditions.status are one of True, False, Unknown.
@@ -47,7 +48,6 @@ type BusyboxStatus struct {
4748
// are considered a guaranteed API.
4849
// Busybox.status.conditions.Message is a human readable message indicating details about the transition.
4950
// For further information see: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties
50-
5151
Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
5252
}
5353

testdata/project-v4-multigroup/api/example.com/v1alpha1/memcached_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ type MemcachedSpec struct {
4242

4343
// MemcachedStatus defines the observed state of Memcached
4444
type MemcachedStatus struct {
45+
// nolint:lll
4546
// Represents the observations of a Memcached's current state.
4647
// Memcached.status.conditions.type are: "Available", "Progressing", and "Degraded"
4748
// Memcached.status.conditions.status are one of True, False, Unknown.
@@ -50,7 +51,6 @@ type MemcachedStatus struct {
5051
// are considered a guaranteed API.
5152
// Memcached.status.conditions.Message is a human readable message indicating details about the transition.
5253
// For further information see: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties
53-
5454
Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
5555
}
5656

testdata/project-v4-multigroup/config/crd/bases/example.com.testproject.org_busyboxes.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,16 @@ spec:
5353
description: BusyboxStatus defines the observed state of Busybox
5454
properties:
5555
conditions:
56+
description: |-
57+
nolint:lll
58+
Represents the observations of a Busybox's current state.
59+
Busybox.status.conditions.type are: "Available", "Progressing", and "Degraded"
60+
Busybox.status.conditions.status are one of True, False, Unknown.
61+
Busybox.status.conditions.reason the value should be a CamelCase string and producers of specific
62+
condition types may define expected values and meanings for this field, and whether the values
63+
are considered a guaranteed API.
64+
Busybox.status.conditions.Message is a human readable message indicating details about the transition.
65+
For further information see: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties
5666
items:
5767
description: Condition contains details for one aspect of the current
5868
state of this API Resource.

testdata/project-v4-multigroup/config/crd/bases/example.com.testproject.org_memcacheds.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,16 @@ spec:
5858
description: MemcachedStatus defines the observed state of Memcached
5959
properties:
6060
conditions:
61+
description: |-
62+
nolint:lll
63+
Represents the observations of a Memcached's current state.
64+
Memcached.status.conditions.type are: "Available", "Progressing", and "Degraded"
65+
Memcached.status.conditions.status are one of True, False, Unknown.
66+
Memcached.status.conditions.reason the value should be a CamelCase string and producers of specific
67+
condition types may define expected values and meanings for this field, and whether the values
68+
are considered a guaranteed API.
69+
Memcached.status.conditions.Message is a human readable message indicating details about the transition.
70+
For further information see: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties
6171
items:
6272
description: Condition contains details for one aspect of the current
6373
state of this API Resource.

testdata/project-v4-multigroup/dist/install.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,16 @@ spec:
169169
description: BusyboxStatus defines the observed state of Busybox
170170
properties:
171171
conditions:
172+
description: |-
173+
nolint:lll
174+
Represents the observations of a Busybox's current state.
175+
Busybox.status.conditions.type are: "Available", "Progressing", and "Degraded"
176+
Busybox.status.conditions.status are one of True, False, Unknown.
177+
Busybox.status.conditions.reason the value should be a CamelCase string and producers of specific
178+
condition types may define expected values and meanings for this field, and whether the values
179+
are considered a guaranteed API.
180+
Busybox.status.conditions.Message is a human readable message indicating details about the transition.
181+
For further information see: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties
172182
items:
173183
description: Condition contains details for one aspect of the current
174184
state of this API Resource.
@@ -668,6 +678,16 @@ spec:
668678
description: MemcachedStatus defines the observed state of Memcached
669679
properties:
670680
conditions:
681+
description: |-
682+
nolint:lll
683+
Represents the observations of a Memcached's current state.
684+
Memcached.status.conditions.type are: "Available", "Progressing", and "Degraded"
685+
Memcached.status.conditions.status are one of True, False, Unknown.
686+
Memcached.status.conditions.reason the value should be a CamelCase string and producers of specific
687+
condition types may define expected values and meanings for this field, and whether the values
688+
are considered a guaranteed API.
689+
Memcached.status.conditions.Message is a human readable message indicating details about the transition.
690+
For further information see: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties
671691
items:
672692
description: Condition contains details for one aspect of the current
673693
state of this API Resource.

testdata/project-v4-with-plugins/.golangci.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ linters:
2929
exclusions:
3030
generated: lax
3131
rules:
32-
- linters:
33-
- lll
34-
path: api/*
3532
- linters:
3633
- dupl
3734
- lll

testdata/project-v4-with-plugins/api/v1alpha1/busybox_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ type BusyboxSpec struct {
3939

4040
// BusyboxStatus defines the observed state of Busybox
4141
type BusyboxStatus struct {
42+
// nolint:lll
4243
// Represents the observations of a Busybox's current state.
4344
// Busybox.status.conditions.type are: "Available", "Progressing", and "Degraded"
4445
// Busybox.status.conditions.status are one of True, False, Unknown.
@@ -47,7 +48,6 @@ type BusyboxStatus struct {
4748
// are considered a guaranteed API.
4849
// Busybox.status.conditions.Message is a human readable message indicating details about the transition.
4950
// For further information see: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties
50-
5151
Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
5252
}
5353

testdata/project-v4-with-plugins/api/v1alpha1/memcached_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ type MemcachedSpec struct {
4242

4343
// MemcachedStatus defines the observed state of Memcached
4444
type MemcachedStatus struct {
45+
// nolint:lll
4546
// Represents the observations of a Memcached's current state.
4647
// Memcached.status.conditions.type are: "Available", "Progressing", and "Degraded"
4748
// Memcached.status.conditions.status are one of True, False, Unknown.
@@ -50,7 +51,6 @@ type MemcachedStatus struct {
5051
// are considered a guaranteed API.
5152
// Memcached.status.conditions.Message is a human readable message indicating details about the transition.
5253
// For further information see: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties
53-
5454
Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
5555
}
5656

testdata/project-v4-with-plugins/config/crd/bases/example.com.testproject.org_busyboxes.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,16 @@ spec:
5353
description: BusyboxStatus defines the observed state of Busybox
5454
properties:
5555
conditions:
56+
description: |-
57+
nolint:lll
58+
Represents the observations of a Busybox's current state.
59+
Busybox.status.conditions.type are: "Available", "Progressing", and "Degraded"
60+
Busybox.status.conditions.status are one of True, False, Unknown.
61+
Busybox.status.conditions.reason the value should be a CamelCase string and producers of specific
62+
condition types may define expected values and meanings for this field, and whether the values
63+
are considered a guaranteed API.
64+
Busybox.status.conditions.Message is a human readable message indicating details about the transition.
65+
For further information see: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties
5666
items:
5767
description: Condition contains details for one aspect of the current
5868
state of this API Resource.

testdata/project-v4-with-plugins/config/crd/bases/example.com.testproject.org_memcacheds.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,16 @@ spec:
5858
description: MemcachedStatus defines the observed state of Memcached
5959
properties:
6060
conditions:
61+
description: |-
62+
nolint:lll
63+
Represents the observations of a Memcached's current state.
64+
Memcached.status.conditions.type are: "Available", "Progressing", and "Degraded"
65+
Memcached.status.conditions.status are one of True, False, Unknown.
66+
Memcached.status.conditions.reason the value should be a CamelCase string and producers of specific
67+
condition types may define expected values and meanings for this field, and whether the values
68+
are considered a guaranteed API.
69+
Memcached.status.conditions.Message is a human readable message indicating details about the transition.
70+
For further information see: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties
6171
items:
6272
description: Condition contains details for one aspect of the current
6373
state of this API Resource.

testdata/project-v4-with-plugins/dist/chart/templates/crd/example.com.testproject.org_busyboxes.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,16 @@ spec:
5959
description: BusyboxStatus defines the observed state of Busybox
6060
properties:
6161
conditions:
62+
description: |-
63+
nolint:lll
64+
Represents the observations of a Busybox's current state.
65+
Busybox.status.conditions.type are: "Available", "Progressing", and "Degraded"
66+
Busybox.status.conditions.status are one of True, False, Unknown.
67+
Busybox.status.conditions.reason the value should be a CamelCase string and producers of specific
68+
condition types may define expected values and meanings for this field, and whether the values
69+
are considered a guaranteed API.
70+
Busybox.status.conditions.Message is a human readable message indicating details about the transition.
71+
For further information see: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties
6272
items:
6373
description: Condition contains details for one aspect of the current
6474
state of this API Resource.

testdata/project-v4-with-plugins/dist/chart/templates/crd/example.com.testproject.org_memcacheds.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,16 @@ spec:
6464
description: MemcachedStatus defines the observed state of Memcached
6565
properties:
6666
conditions:
67+
description: |-
68+
nolint:lll
69+
Represents the observations of a Memcached's current state.
70+
Memcached.status.conditions.type are: "Available", "Progressing", and "Degraded"
71+
Memcached.status.conditions.status are one of True, False, Unknown.
72+
Memcached.status.conditions.reason the value should be a CamelCase string and producers of specific
73+
condition types may define expected values and meanings for this field, and whether the values
74+
are considered a guaranteed API.
75+
Memcached.status.conditions.Message is a human readable message indicating details about the transition.
76+
For further information see: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties
6777
items:
6878
description: Condition contains details for one aspect of the current
6979
state of this API Resource.

testdata/project-v4-with-plugins/dist/install.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,16 @@ spec:
6161
description: BusyboxStatus defines the observed state of Busybox
6262
properties:
6363
conditions:
64+
description: |-
65+
nolint:lll
66+
Represents the observations of a Busybox's current state.
67+
Busybox.status.conditions.type are: "Available", "Progressing", and "Degraded"
68+
Busybox.status.conditions.status are one of True, False, Unknown.
69+
Busybox.status.conditions.reason the value should be a CamelCase string and producers of specific
70+
condition types may define expected values and meanings for this field, and whether the values
71+
are considered a guaranteed API.
72+
Busybox.status.conditions.Message is a human readable message indicating details about the transition.
73+
For further information see: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties
6474
items:
6575
description: Condition contains details for one aspect of the current
6676
state of this API Resource.
@@ -182,6 +192,16 @@ spec:
182192
description: MemcachedStatus defines the observed state of Memcached
183193
properties:
184194
conditions:
195+
description: |-
196+
nolint:lll
197+
Represents the observations of a Memcached's current state.
198+
Memcached.status.conditions.type are: "Available", "Progressing", and "Degraded"
199+
Memcached.status.conditions.status are one of True, False, Unknown.
200+
Memcached.status.conditions.reason the value should be a CamelCase string and producers of specific
201+
condition types may define expected values and meanings for this field, and whether the values
202+
are considered a guaranteed API.
203+
Memcached.status.conditions.Message is a human readable message indicating details about the transition.
204+
For further information see: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties
185205
items:
186206
description: Condition contains details for one aspect of the current
187207
state of this API Resource.

testdata/project-v4/.golangci.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ linters:
2929
exclusions:
3030
generated: lax
3131
rules:
32-
- linters:
33-
- lll
34-
path: api/*
3532
- linters:
3633
- dupl
3734
- lll

0 commit comments

Comments
 (0)