From fa55c1c3fd95770d680149f65914d60fc694a179 Mon Sep 17 00:00:00 2001 From: Alik Saring Date: Mon, 26 Feb 2024 11:58:27 -0500 Subject: [PATCH 1/2] Fixing golang format and linting --- .github/workflows/actions.yml | 6 +++--- .github/workflows/linters.yaml | 10 +++++----- iscsi_test.go | 2 +- pkg/scsi/scsi_test.go | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index b0f20f9..6b29448 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout the code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Run the formatter, linter, and vetter uses: dell/common-github-actions/go-code-formatter-linter-vetter@main with: @@ -20,7 +20,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout the code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Run Go Security uses: securego/gosec@master with: @@ -30,7 +30,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout the code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Run malware scan uses: dell/common-github-actions/malware-scanner@main with: diff --git a/.github/workflows/linters.yaml b/.github/workflows/linters.yaml index e7aad32..0221dee 100644 --- a/.github/workflows/linters.yaml +++ b/.github/workflows/linters.yaml @@ -14,17 +14,17 @@ jobs: name: golangci-lint runs-on: ubuntu-latest steps: - - uses: actions/setup-go@v4 + - uses: actions/setup-go@v5 with: - go-version: "1.20" + go-version: "1.22" cache: false - name: Checkout the code - uses: actions/checkout@v3.2.0 + uses: actions/checkout@v4.1.0 - name: Vendor packages run: | go mod vendor - name: golangci-lint - uses: golangci/golangci-lint-action@v3 + uses: golangci/golangci-lint-action@v4 with: - version: v1.53 + version: latest skip-cache: true diff --git a/iscsi_test.go b/iscsi_test.go index d293396..b494efb 100644 --- a/iscsi_test.go +++ b/iscsi_test.go @@ -320,7 +320,7 @@ func TestISCSIConnector_ConnectVolume(t *testing.T) { { name: "empty request", fields: getDefaultISCSIFields(ctrl), - stateSetter: func(fields iscsiFields) {}, + stateSetter: func(_ iscsiFields) {}, args: args{ctx: ctx, info: ISCSIVolumeInfo{}}, want: Device{}, wantErr: true, diff --git a/pkg/scsi/scsi_test.go b/pkg/scsi/scsi_test.go index ed5e6db..05fcc3a 100644 --- a/pkg/scsi/scsi_test.go +++ b/pkg/scsi/scsi_test.go @@ -249,7 +249,7 @@ func Test_scsi_RescanSCSIDeviceByHCTL(t *testing.T) { { name: "HCTL is not full", fields: getDefaultSCSIFields(ctrl), - stateSetter: func(fields scsiFields) {}, + stateSetter: func(_ scsiFields) {}, args: args{ctx: ctx, h: getHostOnlyHCTL()}, wantErr: true, }, @@ -955,7 +955,7 @@ func Test_scsi_GetDeviceNameByHCTL(t *testing.T) { { name: "invalid HCTL", fields: getDefaultSCSIFields(ctrl), - stateSetter: func(fields scsiFields) {}, + stateSetter: func(_ scsiFields) {}, args: args{ctx: ctx, h: getHostOnlyHCTL()}, want: "", wantErr: true, From a2cd34164e128a3e1bc9a253ec50b36c417f7b13 Mon Sep 17 00:00:00 2001 From: Alik Saring Date: Mon, 26 Feb 2024 12:58:03 -0500 Subject: [PATCH 2/2] Fixing golang format and linting --- .github/CODEOWNERS | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 2c97b4b..cbd981e 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -8,6 +8,8 @@ # order is alphabetical for easier maintenance. # # Alexander Hoppe (hoppea2) +# Alik Saring (alikdell) +# Aaron Tye (atye) # Bahubali Jain (bpjain2004) # Francis Nijay (francis-nijay) # Harish P (harishp8889) @@ -15,7 +17,9 @@ # Prsanna Muthukumaraswamy (prablr79) # Trevor Dawe (tdawe) # Florian Coulombel (coulof) +# Shayna Finocchiaro (shaynafinocchiaro) +# Luna Xu (xuluna) # for all files: -* @kumarp20 @bpjain2004 @francis-nijay @harishp8889 @prablr79 @hoppea2 @tdawe @coulof +* @kumarp20 @bpjain2004 @francis-nijay @harishp8889 @prablr79 @hoppea2 @tdawe @coulof @shaynafinocchiaro @xuluna @alikdell @atye