Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Adapt .golangci.yaml for v1.58.0 #1040

Merged
merged 1 commit into from
May 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading