Revert "ci(lint): re-enable prealloc in golangci-lint config"
This reverts commit a889852897.
This commit is contained in:
parent
80ff40734a
commit
3499dcef71
|
|
@ -28,7 +28,7 @@ linters:
|
||||||
- loggercheck
|
- loggercheck
|
||||||
- misspell
|
- misspell
|
||||||
- nakedret
|
- nakedret
|
||||||
- prealloc
|
# - prealloc
|
||||||
- staticcheck
|
- staticcheck
|
||||||
- typecheck
|
- typecheck
|
||||||
- unconvert
|
- unconvert
|
||||||
|
|
|
||||||
|
|
@ -267,7 +267,7 @@ func compareMap(expected, actual map[string]string) bool {
|
||||||
}
|
}
|
||||||
|
|
||||||
func compareEnv(expected, actual []corev1.EnvVar) bool {
|
func compareEnv(expected, actual []corev1.EnvVar) bool {
|
||||||
actualEnv := make([]corev1.EnvVar, 0, len(actual))
|
var actualEnv []corev1.EnvVar
|
||||||
for _, env := range actual {
|
for _, env := range actual {
|
||||||
if env.Name == "KUBERNETES_PORT_443_TCP_ADDR" || env.Name == "KUBERNETES_PORT" ||
|
if env.Name == "KUBERNETES_PORT_443_TCP_ADDR" || env.Name == "KUBERNETES_PORT" ||
|
||||||
env.Name == "KUBERNETES_PORT_443_TCP" || env.Name == "KUBERNETES_SERVICE_HOST" {
|
env.Name == "KUBERNETES_PORT_443_TCP" || env.Name == "KUBERNETES_SERVICE_HOST" {
|
||||||
|
|
@ -292,7 +292,7 @@ func CompareContainerVolumeMounts(expected corev1.Container, actual corev1.Conta
|
||||||
|
|
||||||
// compareVolumes returns true if Jenkins pod and Jenkins CR volumes are the same
|
// compareVolumes returns true if Jenkins pod and Jenkins CR volumes are the same
|
||||||
func (r *JenkinsBaseConfigurationReconciler) compareVolumes(actualPod corev1.Pod) bool {
|
func (r *JenkinsBaseConfigurationReconciler) compareVolumes(actualPod corev1.Pod) bool {
|
||||||
toCompare := make([]corev1.Volume, 0, len(actualPod.Spec.Volumes))
|
var toCompare []corev1.Volume
|
||||||
for _, volume := range actualPod.Spec.Volumes {
|
for _, volume := range actualPod.Spec.Volumes {
|
||||||
// filter out service account
|
// filter out service account
|
||||||
if strings.HasPrefix(volume.Name, actualPod.Spec.ServiceAccountName) {
|
if strings.HasPrefix(volume.Name, actualPod.Spec.ServiceAccountName) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue