Skip to content

Commit 30c7f55

Browse files
committed
Fixup linting issues
* Fix Deprecated comments. * Fix package naming exclusion flag. Signed-off-by: SuperQ <[email protected]>
1 parent 3036678 commit 30c7f55

File tree

4 files changed

+11
-2
lines changed

4 files changed

+11
-2
lines changed

.golangci.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,11 @@ linters:
3737
revive:
3838
rules:
3939
- name: var-naming
40-
disabled: true
40+
# TODO(SuperQ): See: https://github.com/prometheus/prometheus/issues/17766
41+
arguments:
42+
- []
43+
- []
44+
- - skip-package-name-checks: true
4145
exclusions:
4246
presets:
4347
- comments

cpuinfo.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ func parseCPUInfoRISCV(info []byte) ([]CPUInfo, error) {
501501
return cpuinfo, nil
502502
}
503503

504-
func parseCPUInfoDummy(_ []byte) ([]CPUInfo, error) { // nolint:unused,deadcode
504+
func parseCPUInfoDummy(_ []byte) ([]CPUInfo, error) { //nolint:unused
505505
return nil, errors.New("not implemented")
506506
}
507507

net_tcp.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,27 +25,31 @@ type (
2525

2626
// NetTCP returns the IPv4 kernel/networking statistics for TCP datagrams
2727
// read from /proc/net/tcp.
28+
//
2829
// Deprecated: Use github.com/mdlayher/netlink#Conn (with syscall.AF_INET) instead.
2930
func (fs FS) NetTCP() (NetTCP, error) {
3031
return newNetTCP(fs.proc.Path("net/tcp"))
3132
}
3233

3334
// NetTCP6 returns the IPv6 kernel/networking statistics for TCP datagrams
3435
// read from /proc/net/tcp6.
36+
//
3537
// Deprecated: Use github.com/mdlayher/netlink#Conn (with syscall.AF_INET6) instead.
3638
func (fs FS) NetTCP6() (NetTCP, error) {
3739
return newNetTCP(fs.proc.Path("net/tcp6"))
3840
}
3941

4042
// NetTCPSummary returns already computed statistics like the total queue lengths
4143
// for TCP datagrams read from /proc/net/tcp.
44+
//
4245
// Deprecated: Use github.com/mdlayher/netlink#Conn (with syscall.AF_INET) instead.
4346
func (fs FS) NetTCPSummary() (*NetTCPSummary, error) {
4447
return newNetTCPSummary(fs.proc.Path("net/tcp"))
4548
}
4649

4750
// NetTCP6Summary returns already computed statistics like the total queue lengths
4851
// for TCP datagrams read from /proc/net/tcp6.
52+
//
4953
// Deprecated: Use github.com/mdlayher/netlink#Conn (with syscall.AF_INET6) instead.
5054
func (fs FS) NetTCP6Summary() (*NetTCPSummary, error) {
5155
return newNetTCPSummary(fs.proc.Path("net/tcp6"))

proc_statm.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ type ProcStatm struct {
4545
}
4646

4747
// NewStatm returns the current status information of the process.
48+
//
4849
// Deprecated: Use p.Statm() instead.
4950
func (p Proc) NewStatm() (ProcStatm, error) {
5051
return p.Statm()

0 commit comments

Comments
 (0)