Skip to content

Commit 55756f0

Browse files
prombotSuperQ
andauthored
Synchronize common files from prometheus/prometheus (#3469)
* Update common Prometheus files Signed-off-by: prombot <[email protected]> * Fixup linting issues. Signed-off-by: Ben Kochie <[email protected]> --------- Signed-off-by: prombot <[email protected]> Signed-off-by: Ben Kochie <[email protected]> Co-authored-by: Ben Kochie <[email protected]>
1 parent c9f46cb commit 55756f0

File tree

169 files changed

+21
-199
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

169 files changed

+21
-199
lines changed

.golangci.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,12 @@ linters:
3333
- linters:
3434
- errcheck
3535
path: _test.go
36-
paths:
37-
- third_party$
38-
- builtin$
39-
- examples$
4036
formatters:
4137
enable:
4238
- goimports
4339
exclusions:
4440
generated: lax
45-
paths:
46-
- third_party$
47-
- builtin$
48-
- examples$
41+
settings:
42+
goimports:
43+
local-prefixes:
44+
- github.com/prometheus/node_exporter

Makefile.common

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ PROMU_URL := https://github.com/prometheus/promu/releases/download/v$(PROMU_
6161
SKIP_GOLANGCI_LINT :=
6262
GOLANGCI_LINT :=
6363
GOLANGCI_LINT_OPTS ?=
64-
GOLANGCI_LINT_VERSION ?= v2.4.0
64+
GOLANGCI_LINT_VERSION ?= v2.6.0
6565
GOLANGCI_FMT_OPTS ?=
6666
# golangci-lint only supports linux, darwin and windows platforms on i386/amd64/arm64.
6767
# windows isn't included here because of the path separator being different.

collector/arp_linux.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
// limitations under the License.
1313

1414
//go:build !noarp
15-
// +build !noarp
1615

1716
package collector
1817

collector/bcache_linux.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
// limitations under the License.
1313

1414
//go:build !nobcache
15-
// +build !nobcache
1615

1716
package collector
1817

collector/bonding_linux.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
// limitations under the License.
1313

1414
//go:build !nobonding
15-
// +build !nobonding
1615

1716
package collector
1817

collector/bonding_linux_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
// limitations under the License.
1313

1414
//go:build !nobonding
15-
// +build !nobonding
1615

1716
package collector
1817

collector/boot_time_bsd.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
// limitations under the License.
1313

1414
//go:build (freebsd || dragonfly || openbsd || netbsd || darwin) && !noboottime
15-
// +build freebsd dragonfly openbsd netbsd darwin
16-
// +build !noboottime
1715

1816
package collector
1917

collector/boot_time_solaris.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@
1212
// limitations under the License.
1313

1414
//go:build !noboottime
15-
// +build !noboottime
1615

1716
package collector
1817

1918
import (
19+
"log/slog"
20+
2021
"github.com/illumos/go-kstat"
2122
"github.com/prometheus/client_golang/prometheus"
22-
"log/slog"
2323
)
2424

2525
type bootTimeCollector struct {

collector/btrfs_linux.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
// limitations under the License.
1313

1414
//go:build !nobtrfs
15-
// +build !nobtrfs
1615

1716
package collector
1817

collector/btrfs_linux_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
// limitations under the License.
1313

1414
//go:build !nobtrfs
15-
// +build !nobtrfs
1615

1716
package collector
1817

0 commit comments

Comments
 (0)