mirror of
https://github.com/hanzo-ml/spark-operator.git
synced 2026-10-30 20:39:07 +00:00
* Bump k8s api to 0.35.4, and controller runtime to v0.23.3 Signed-off-by: Shingo Omura <[email protected]> * Migrated defaulter/validator to be Generic ones Signed-off-by: Shingo Omura <[email protected]> * Fixed Endpoints deprecation lint errors (replaced with EndpointSlice) Signed-off-by: Shingo Omura <[email protected]> * Deleted unused internal/controller/sparkapplication/validator.go Signed-off-by: Shingo Omura <[email protected]> * Add SA1019 exclusion to golangci-lint config so to preserve Requeue behavior of controllers Signed-off-by: Shingo Omura <[email protected]> * Fixed util.WriteObjectToFile test. Null creationTimestamp is not marshalled anymore. Signed-off-by: Shingo Omura <[email protected]> * Updated codegen and API definitions Signed-off-by: Shingo Omura <[email protected]> * Fixed mgr.GetEventRecorderFor() deprecation (replace with mgr.GetEventRecorder()) Signed-off-by: Shingo Omura <[email protected]> --------- Signed-off-by: Shingo Omura <[email protected]>
73 lines
2.0 KiB
YAML
73 lines
2.0 KiB
YAML
version: "2"
|
|
|
|
run:
|
|
# Timeout for total work, e.g. 30s, 5m, 5m30s.
|
|
# If the value is lower or equal to 0, the timeout is disabled.
|
|
# Default: 0 (disabled)
|
|
timeout: 2m
|
|
|
|
linters:
|
|
# Enable specific linters.
|
|
# https://golangci-lint.run/usage/linters/#enabled-by-default
|
|
enable:
|
|
# Detects places where loop variables are copied.
|
|
- copyloopvar
|
|
# Checks for duplicate words in the source code.
|
|
- dupword
|
|
# Tool for detection of FIXME, TODO and other comment keywords.
|
|
# - godox
|
|
# Enforces consistent import aliases.
|
|
- importas
|
|
# Find code that shadows one of Go's predeclared identifiers.
|
|
- predeclared
|
|
# Check that struct tags are well aligned.
|
|
- tagalign
|
|
# Remove unnecessary type conversions.
|
|
- unconvert
|
|
# Checks Go code for unused constants, variables, functions and types.
|
|
- unused
|
|
|
|
settings:
|
|
importas:
|
|
# List of aliases
|
|
alias:
|
|
- pkg: k8s.io/api/admissionregistration/v1
|
|
alias: admissionregistrationv1
|
|
- pkg: k8s.io/api/apps/v1
|
|
alias: appsv1
|
|
- pkg: k8s.io/api/batch/v1
|
|
alias: batchv1
|
|
- pkg: k8s.io/api/core/v1
|
|
alias: corev1
|
|
- pkg: k8s.io/api/extensions/v1beta1
|
|
alias: extensionsv1beta1
|
|
- pkg: k8s.io/api/networking/v1
|
|
alias: networkingv1
|
|
- pkg: k8s.io/apimachinery/pkg/apis/meta/v1
|
|
alias: metav1
|
|
- pkg: sigs.k8s.io/controller-runtime
|
|
alias: ctrl
|
|
|
|
exclusions:
|
|
rules:
|
|
# exclude staticcheck SA1019 for Result.Requeue.
|
|
- linters:
|
|
- staticcheck
|
|
text: "SA1019: .*\\.Requeue is deprecated: Use `RequeueAfter` instead."
|
|
|
|
issues:
|
|
# Maximum issues count per one linter.
|
|
# Set to 0 to disable.
|
|
# Default: 50
|
|
max-issues-per-linter: 50
|
|
# Maximum count of issues with the same text.
|
|
# Set to 0 to disable.
|
|
# Default: 3
|
|
max-same-issues: 3
|
|
|
|
formatters:
|
|
enable:
|
|
# Check import statements are formatted according to the 'goimport' command.
|
|
- goimports
|
|
|