ci(lint): re-enable prealloc in golangci-lint config
* resolves prealloc lint warnings in base/reconciler.go
This commit is contained in:
		
							parent
							
								
									dc33f507e7
								
							
						
					
					
						commit
						a889852897
					
				| 
						 | 
					@ -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 {
 | 
				
			||||||
	var actualEnv []corev1.EnvVar
 | 
						actualEnv := make([]corev1.EnvVar, 0, len(actual))
 | 
				
			||||||
	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 {
 | 
				
			||||||
	var toCompare []corev1.Volume
 | 
						toCompare := make([]corev1.Volume, 0, len(actualPod.Spec.Volumes))
 | 
				
			||||||
	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