Skip to content

Commit

Permalink
Merge branch 'master' into gpu-clk
Browse files Browse the repository at this point in the history
  • Loading branch information
zxhdaze authored Sep 23, 2024
2 parents 6d66518 + a37174e commit 0c2e909
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ jobs:
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Install Go
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version: 1.22.x
go-version: 1.23.x
- name: Install snmp_exporter/generator dependencies
run: sudo apt-get update && sudo apt-get -y install libsnmp-dev
if: github.repository == 'prometheus/snmp_exporter'
- name: Lint
uses: golangci/golangci-lint-action@a4f60bb28d35aeee14e6880718e0c85ff1882e64 # v6.0.1
uses: golangci/golangci-lint-action@aaa42aa0628b4ae2578232a66b541047968fac86 # v6.1.0
with:
args: --verbose
version: v1.59.1
version: v1.60.2
8 changes: 7 additions & 1 deletion Makefile.common
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ PROMU_URL := https://github.com/prometheus/promu/releases/download/v$(PROMU_
SKIP_GOLANGCI_LINT :=
GOLANGCI_LINT :=
GOLANGCI_LINT_OPTS ?=
GOLANGCI_LINT_VERSION ?= v1.59.1
GOLANGCI_LINT_VERSION ?= v1.60.2
# golangci-lint only supports linux, darwin and windows platforms on i386/amd64/arm64.
# windows isn't included here because of the path separator being different.
ifeq ($(GOHOSTOS),$(filter $(GOHOSTOS),linux darwin))
Expand Down Expand Up @@ -275,3 +275,9 @@ $(1)_precheck:
exit 1; \
fi
endef

govulncheck: install-govulncheck
govulncheck ./...

install-govulncheck:
command -v govulncheck > /dev/null || go install golang.org/x/vuln/cmd/govulncheck@latest
8 changes: 4 additions & 4 deletions collector/filesystem_netbsd.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ package collector

import (
"fmt"
"github.com/go-kit/log/level"
"golang.org/x/sys/unix"
"syscall"
"unsafe"

"golang.org/x/sys/unix"
)

const (
Expand Down Expand Up @@ -98,14 +98,14 @@ func (c *filesystemCollector) GetStats() (stats []filesystemStats, err error) {
for _, v := range mnt {
mountpoint := unix.ByteSliceToString(v.F_mntonname[:])
if c.excludedMountPointsPattern.MatchString(mountpoint) {
level.Debug(c.logger).Log("msg", "Ignoring mount point", "mountpoint", mountpoint)
c.logger.Debug("msg", "Ignoring mount point", "mountpoint", mountpoint)
continue
}

device := unix.ByteSliceToString(v.F_mntfromname[:])
fstype := unix.ByteSliceToString(v.F_fstypename[:])
if c.excludedFSTypesPattern.MatchString(fstype) {
level.Debug(c.logger).Log("msg", "Ignoring fs type", "type", fstype)
c.logger.Debug("msg", "Ignoring fs type", "type", fstype)
continue
}

Expand Down

0 comments on commit 0c2e909

Please sign in to comment.