Skip to content

Commit 3572cb5

Browse files
authored
Merge pull request #1586 from mythi/PR-2023-053
ci: update golangci-lint
2 parents 3a5350d + 31be772 commit 3572cb5

File tree

7 files changed

+12
-12
lines changed

7 files changed

+12
-12
lines changed

.github/workflows/lib-validate.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
- name: golangci-lint
4242
uses: golangci/golangci-lint-action@v3
4343
with:
44-
version: v1.52.1
44+
version: v1.55.2
4545
args: -v --timeout 5m
4646

4747
build:

.golangci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ linters-settings:
5151
simplify: true
5252
golint:
5353
min-confidence: 0.9
54+
goconst:
55+
ignore-tests: true
5456
govet:
5557
check-shadowing: true
5658
enable:

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ EXTRA_BUILD_ARGS ?= ""
1010

1111
CERT_MANAGER_VERSION ?= v1.13.2
1212
CONTROLLER_GEN_VERSION ?= v0.13.0
13-
GOLANGCI_LINT_VERSION ?= v1.54.2
13+
GOLANGCI_LINT_VERSION ?= v1.55.2
1414
KIND_VERSION ?= v0.20.0
1515
GOLICENSES_VERSION ?= v1.6.0
1616
# Default bundle image tag

cmd/gpu_plugin/gpu_plugin.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ func newDevicePlugin(sysfsDir, devfsDir string, options cliOptions) *devicePlugi
300300
}
301301

302302
if _, err := os.ReadDir(dp.bypathDir); err != nil {
303-
klog.Warningf("failed to read by-path dir: $+v", err)
303+
klog.Warningf("failed to read by-path dir: %+v", err)
304304

305305
dp.bypathFound = false
306306
}

demo/sgx-sdk-demo/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ RUN apt-get update && \
2323
# SGX SDK is installed in /opt/intel directory.
2424
WORKDIR /opt/intel
2525

26-
ARG DCAP_VERSION=DCAP_1.18
26+
ARG DCAP_VERSION=DCAP_1.19
2727

2828
RUN echo "deb [arch=amd64 signed-by=/usr/share/keyrings/intel-sgx.gpg] https://download.01.org/intel-sgx/sgx_repo/ubuntu jammy main" | \
2929
tee -a /etc/apt/sources.list.d/intel-sgx.list \
@@ -37,7 +37,7 @@ RUN echo "deb [arch=amd64 signed-by=/usr/share/keyrings/intel-sgx.gpg] https://d
3737
libsgx-quote-ex-dev
3838

3939
# Install SGX SDK
40-
ARG SGX_SDK_URL=https://download.01.org/intel-sgx/sgx-linux/2.21/distro/ubuntu22.04-server/sgx_linux_x64_sdk_2.21.100.1.bin
40+
ARG SGX_SDK_URL=https://download.01.org/intel-sgx/sgx-linux/2.22/distro/ubuntu22.04-server/sgx_linux_x64_sdk_2.22.100.3.bin
4141
RUN wget ${SGX_SDK_URL} \
4242
&& export SGX_SDK_INSTALLER=$(basename $SGX_SDK_URL) \
4343
&& chmod +x $SGX_SDK_INSTALLER \

pkg/fpga/bitstream/bitstream.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,7 @@ import (
2424
// GetFPGABitstream scans bitstream storage and returns first found bitstream by region and afu id.
2525
func GetFPGABitstream(bitstreamDir, region, afu string) (File, error) {
2626
bitstreamPath := ""
27-
// Temporarily only support gbs bitstreams
28-
// for _, ext := range []string{".gbs", ".aocx"} {
29-
for _, ext := range []string{".gbs", ".aocx"} {
27+
for _, ext := range []string{fileExtensionGBS, fileExtensionAOCX} {
3028
bitstreamPath = filepath.Join(bitstreamDir, region, afu+ext)
3129

3230
_, err := os.Stat(bitstreamPath)
@@ -47,9 +45,9 @@ func GetFPGABitstream(bitstreamDir, region, afu string) (File, error) {
4745
// Open bitstream file, detecting type based on the filename extension.
4846
func Open(fname string) (File, error) {
4947
switch filepath.Ext(fname) {
50-
case ".gbs":
48+
case fileExtensionGBS:
5149
return OpenGBS(fname)
52-
case ".aocx":
50+
case fileExtensionAOCX:
5351
return OpenAOCX(fname)
5452
}
5553

pkg/fpga/bitstream/gbs_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ func TestFileGBSMethods(t *testing.T) {
5252
interfaceUUID := "69528db6eb31577a8c3668f9faa081f6"
5353
typeUUID := "d8424dc4a4a3c413f89e433683f9040b"
5454

55-
gbs, err := OpenGBS(filepath.Join("testdata/intel.com/fpga", interfaceUUID, typeUUID) + ".gbs")
55+
gbs, err := OpenGBS(filepath.Join("testdata/intel.com/fpga", interfaceUUID, typeUUID) + fileExtensionGBS)
5656
if err != nil {
5757
t.Errorf("unexpected open error: %+v", err)
5858
return
@@ -76,7 +76,7 @@ func TestFileGBSMethods(t *testing.T) {
7676
}
7777

7878
installPath := gbs.InstallPath("")
79-
if installPath != filepath.Join(interfaceUUID, typeUUID)+".gbs" {
79+
if installPath != filepath.Join(interfaceUUID, typeUUID)+fileExtensionGBS {
8080
t.Errorf("unexpected Install Path value: %s", installPath)
8181
}
8282

0 commit comments

Comments
 (0)