Skip to content

Commit

Permalink
chore: Adapt .golangci.yaml for v1.58.0 (#1040)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrkl authored May 6, 2024
1 parent 2a2d9b5 commit 1a79bee
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 11 deletions.
6 changes: 4 additions & 2 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ linters:
- scopelint
- structcheck
- varcheck
- gomnd
- execinquery
# Linters to be enabled after fixing the issues
- intrange
- cyclop
Expand All @@ -30,9 +32,9 @@ linters:
- gocritic
- godot
- godox
- goerr113
- err113
- gofumpt
- gomnd
- mnd
- ireturn
- lll
- maintidx
Expand Down
2 changes: 1 addition & 1 deletion apis/operator/v1alpha1/telemetry_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ type TelemetryList struct {
Items []Telemetry `json:"items"`
}

//nolint:gochecknoinits // SchemeBuilder's registration is required.
//nolint:init // SchemeBuilder's registration is required.
func init() {
SchemeBuilder.Register(&Telemetry{}, &TelemetryList{})
}
Expand Down
2 changes: 1 addition & 1 deletion apis/telemetry/v1alpha1/logparser_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ type LogParserStatus struct {
Conditions []metav1.Condition `json:"conditions,omitempty"`
}

//nolint:gochecknoinits // SchemeBuilder's registration is required.
//nolint:init // SchemeBuilder's registration is required.
func init() {
SchemeBuilder.Register(&LogParser{}, &LogParserList{})
}
2 changes: 1 addition & 1 deletion apis/telemetry/v1alpha1/logpipeline_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ type LogPipelineList struct {
Items []LogPipeline `json:"items"`
}

//nolint:gochecknoinits // SchemeBuilder's registration is required.
//nolint:init // SchemeBuilder's registration is required.
func init() {
SchemeBuilder.Register(&LogPipeline{}, &LogPipelineList{})
}
2 changes: 1 addition & 1 deletion apis/telemetry/v1alpha1/metricpipeline_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

//nolint:gochecknoinits // SchemeBuilder's registration is required.
//nolint:init // SchemeBuilder's registration is required.
func init() {
SchemeBuilder.Register(&MetricPipeline{}, &MetricPipelineList{})
}
Expand Down
2 changes: 1 addition & 1 deletion apis/telemetry/v1alpha1/tracepipeline_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ type TracePipelineList struct {
Items []TracePipeline `json:"items"`
}

//nolint:gochecknoinits // SchemeBuilder's registration is required.
//nolint:init // SchemeBuilder's registration is required.
func init() {
SchemeBuilder.Register(&TracePipeline{}, &TracePipelineList{})
}
2 changes: 1 addition & 1 deletion apis/telemetry/v1beta1/logpipeline_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ type LogPipelineList struct {
Items []LogPipeline `json:"items"`
}

//nolint:gochecknoinits // SchemeBuilder's registration is required.
//nolint:init // SchemeBuilder's registration is required.
func init() {
SchemeBuilder.Register(&LogPipeline{}, &LogPipelineList{})
}
Expand Down
2 changes: 1 addition & 1 deletion apis/telemetry/v1beta1/metricpipeline_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ type MetricPipelineList struct {
Items []MetricPipeline `json:"items"`
}

//nolint:gochecknoinits // SchemeBuilder's registration is required.
//nolint:init // SchemeBuilder's registration is required.
func init() {
SchemeBuilder.Register(&MetricPipeline{}, &MetricPipelineList{})
}
2 changes: 1 addition & 1 deletion apis/telemetry/v1beta1/tracepipeline_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ type TracePipelineList struct {
Items []TracePipeline `json:"items"`
}

//nolint:gochecknoinits // SchemeBuilder's registration is required.
//nolint:init // SchemeBuilder's registration is required.
func init() {
SchemeBuilder.Register(&TracePipeline{}, &TracePipelineList{})
}
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ const (
selfMonitorName = "telemetry-self-monitor"
)

//nolint:gochecknoinits // Runtime's scheme addition is required.
//nolint:init // Runtime's scheme addition is required.
func init() {
utilruntime.Must(clientgoscheme.AddToScheme(scheme))
utilruntime.Must(apiextensionsv1.AddToScheme(scheme))
Expand Down

0 comments on commit 1a79bee

Please sign in to comment.