enable verify-golangci-lint.sh

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
This commit is contained in:
Davanum Srinivas 2021-07-12 19:15:17 -04:00
parent 07332ad398
commit 75748c185e
No known key found for this signature in database
GPG Key ID: 80D83A796103BF59
7 changed files with 8 additions and 8 deletions

View File

@ -35,7 +35,6 @@ EXCLUDED_PATTERNS=(
"verify-linkcheck.sh" # runs in separate Jenkins job once per day due to high network usage "verify-linkcheck.sh" # runs in separate Jenkins job once per day due to high network usage
"verify-*-dockerized.sh" # Don't run any scripts that intended to be run dockerized "verify-*-dockerized.sh" # Don't run any scripts that intended to be run dockerized
"verify-govet-levee.sh" # Do not run levee analysis by default while KEP-1933 implementation is in alpha. "verify-govet-levee.sh" # Do not run levee analysis by default while KEP-1933 implementation is in alpha.
"verify-golangci-lint.sh" # Experimental - intended to be run by hand periodically
) )
# Exclude generated-files-remake in certain cases, if they're running in a separate job. # Exclude generated-files-remake in certain cases, if they're running in a separate job.

View File

@ -1696,8 +1696,7 @@ func TestCSIDriverValidation(t *testing.T) {
storageCapacity := true storageCapacity := true
notStorageCapacity := false notStorageCapacity := false
supportedFSGroupPolicy := storage.FileFSGroupPolicy supportedFSGroupPolicy := storage.FileFSGroupPolicy
invalidFSGroupPolicy := storage.ReadWriteOnceWithFSTypeFSGroupPolicy //nolint:ineffassign invalidFSGroupPolicy := storage.FSGroupPolicy("invalid-mode")
invalidFSGroupPolicy = "invalid-mode"
successCases := []storage.CSIDriver{ successCases := []storage.CSIDriver{
{ {
ObjectMeta: metav1.ObjectMeta{Name: driverName}, ObjectMeta: metav1.ObjectMeta{Name: driverName},
@ -2051,8 +2050,7 @@ func TestCSIDriverValidationUpdate(t *testing.T) {
{ {
name: "FSGroupPolicy invalidated", name: "FSGroupPolicy invalidated",
modify: func(new *storage.CSIDriver) { modify: func(new *storage.CSIDriver) {
invalidFSGroupPolicy := storage.ReadWriteOnceWithFSTypeFSGroupPolicy //nolint:ineffassign invalidFSGroupPolicy := storage.FSGroupPolicy("invalid")
invalidFSGroupPolicy = "invalid"
new.Spec.FSGroupPolicy = &invalidFSGroupPolicy new.Spec.FSGroupPolicy = &invalidFSGroupPolicy
}, },
}, },

View File

@ -59,7 +59,7 @@ func output() error {
if err != nil { if err != nil {
return fmt.Errorf("error serializing api definitions: %w", err) return fmt.Errorf("error serializing api definitions: %w", err)
} }
_, _ = os.Stdout.Write(data) os.Stdout.Write(data)
return nil return nil
} }

View File

@ -387,7 +387,8 @@ func TestRequestNodeCertificate(t *testing.T) {
type failureType int type failureType int
const ( const (
createError = iota noError failureType = iota //nolint:deadcode,varcheck
createError
certificateSigningRequestDenied certificateSigningRequestDenied
) )

View File

@ -244,6 +244,7 @@ var _ = SIGDescribe("Pods", func() {
pods, err := podClient.List(context.TODO(), options) pods, err := podClient.List(context.TODO(), options)
framework.ExpectNoError(err, "failed to query for pods") framework.ExpectNoError(err, "failed to query for pods")
framework.ExpectEqual(len(pods.Items), 0) framework.ExpectEqual(len(pods.Items), 0)
listCompleted := make(chan bool, 1) listCompleted := make(chan bool, 1)
lw := &cache.ListWatch{ lw := &cache.ListWatch{
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {

View File

@ -72,6 +72,7 @@ var _ = SIGDescribe("LimitRange", func() {
limitRanges, err := f.ClientSet.CoreV1().LimitRanges(f.Namespace.Name).List(context.TODO(), options) limitRanges, err := f.ClientSet.CoreV1().LimitRanges(f.Namespace.Name).List(context.TODO(), options)
framework.ExpectNoError(err, "failed to query for limitRanges") framework.ExpectNoError(err, "failed to query for limitRanges")
framework.ExpectEqual(len(limitRanges.Items), 0) framework.ExpectEqual(len(limitRanges.Items), 0)
listCompleted := make(chan bool, 1) listCompleted := make(chan bool, 1)
lw := &cache.ListWatch{ lw := &cache.ListWatch{
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {