Skip to content

Commit

Permalink
chore: more linter related changes
Browse files Browse the repository at this point in the history
Signed-off-by: Brian McGee <[email protected]>
  • Loading branch information
brianmcgee committed Nov 19, 2024
1 parent b71fe12 commit 7d37427
Show file tree
Hide file tree
Showing 16 changed files with 25 additions and 25 deletions.
2 changes: 1 addition & 1 deletion pkg/ephem/swap.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ var (
// SwapType represents the type of swap space, either file or partition.
//
//go:generate enumer -type=SwapType -json -transform=snake -trimprefix SwapType -output=./swap_enum_type.go
type SwapType uint
type SwapType uint //nolint:recvcheck

const (
SwapTypeFile SwapType = iota
Expand Down
2 changes: 1 addition & 1 deletion pkg/hwinfo/detail.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
)

//go:generate enumer -type=DetailType -json -transform=snake -trimprefix DetailType -output=./detail_enum_type.go
type DetailType uint
type DetailType uint //nolint:recvcheck

//nolint:revive,stylecheck
const (
Expand Down
2 changes: 1 addition & 1 deletion pkg/hwinfo/detail_cpu.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import "C"
import "regexp"

//go:generate enumer -type=CPUArch -json -transform=snake -trimprefix CPUArch -output=./detail_enum_cpu_arch.go
type CPUArch uint
type CPUArch uint //nolint:recvcheck

const (
CPUArchUnknown CPUArch = iota
Expand Down
2 changes: 1 addition & 1 deletion pkg/hwinfo/detail_pci.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
)

//go:generate enumer -type=PciFlag -json -transform=snake -trimprefix PciFlag -output=./detail_enum_pci_flag.go
type PciFlag uint
type PciFlag uint //nolint:recvcheck

const (
PciFlagOk PciFlag = iota
Expand Down
2 changes: 1 addition & 1 deletion pkg/hwinfo/detail_usb.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ package hwinfo
import "C"

//go:generate enumer -type=UsbClass -json -transform=snake -trimprefix UsbClass -output=./detail_usb_enum_usb_class.go
type UsbClass uint16
type UsbClass uint16 //nolint:recvcheck

const (
UsbClassPerInterface UsbClass = 0x00
Expand Down
2 changes: 1 addition & 1 deletion pkg/hwinfo/driver_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
)

//go:generate enumer -type=DriverInfoType -json -transform=snake -trimprefix DriverInfoType -output=./driver_info_enum_type.go
type DriverInfoType uint
type DriverInfoType uint //nolint:recvcheck

const (
DriverInfoTypeAny DriverInfoType = iota
Expand Down
14 changes: 7 additions & 7 deletions pkg/hwinfo/hardware.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
// ProbeFeature is a type that specifies various hardware probing features.
//
//go:generate enumer -type=ProbeFeature -json -transform=snake -trimprefix ProbeFeature -output=./hardware_enum_probe_feature.go
type ProbeFeature uint
type ProbeFeature uint //nolint:recvcheck

//nolint:revive,stylecheck
const (
Expand Down Expand Up @@ -120,7 +120,7 @@ const (
// HardwareClass represents the classification of different hardware components.
//
//go:generate enumer -type=HardwareClass -json -transform=snake -trimprefix HardwareClass -output=./hardware_enum_hardware_class.go
type HardwareClass uint
type HardwareClass uint //nolint:recvcheck

//nolint:revive,stylecheck
const (
Expand Down Expand Up @@ -195,7 +195,7 @@ const (
// BaseClass values (superset of PCI classes)
//
//go:generate enumer -type=BaseClass -json -transform=snake -trimprefix BaseClass -output=./hardware_enum_base_class.go
type BaseClass uint16
type BaseClass uint16 //nolint:recvcheck

// these *must* match standard PCI class numbers
const (
Expand Down Expand Up @@ -255,7 +255,7 @@ const (
// SubClassKeyboard values of BaseClassKeyboard
//
//go:generate enumer -type=SubClassKeyboard -json -transform=snake -trimprefix SubClassKeyboard -output=./hardware_enum_sub_class_keyboard.go
type SubClassKeyboard uint16
type SubClassKeyboard uint16 //nolint:recvcheck

const (
SubClassKeyboardKbd SubClassKeyboard = iota
Expand All @@ -265,7 +265,7 @@ const (
// SubClassMouse values of BaseClassMouse
//
//go:generate enumer -type=SubClassMouse -json -transform=snake -trimprefix SubClassMouse -output=./hardware_enum_sub_class_mouse.go
type SubClassMouse uint16
type SubClassMouse uint16 //nolint:recvcheck

const (
SubClassMousePs2 SubClassMouse = iota
Expand Down Expand Up @@ -339,7 +339,7 @@ func NewDeviceNumber(num C.hd_dev_num_t) *DeviceNumber {
// Hotplug defines types of hotplug devices.
//
//go:generate enumer -type=Hotplug -json -transform=snake -trimprefix Hotplug -output=./hardware_enum_hotplug.go
type Hotplug int
type Hotplug int //nolint:recvcheck

const (
HotplugNone Hotplug = iota
Expand All @@ -353,7 +353,7 @@ const (
// Bus types similar to PCI bridge subclasses
//
//go:generate enumer -type=Bus -json -transform=snake -trimprefix Bus -output=./hardware_enum_bus.go
type Bus uint16
type Bus uint16 //nolint:recvcheck

const (
BusNone Bus = iota
Expand Down
2 changes: 1 addition & 1 deletion pkg/hwinfo/id.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
)

//go:generate enumer -type=IDTag -json -transform=snake -trimprefix IDTag -output=./id_tag_enum.go
type IDTag byte
type IDTag byte //nolint:recvcheck

const (
IDTagPci IDTag = iota + 1
Expand Down
2 changes: 1 addition & 1 deletion pkg/hwinfo/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
)

//go:generate enumer -type=ResourceType -json -transform=snake -trimprefix ResourceType -output=./resource_enum_type.go
type ResourceType uint
type ResourceType uint //nolint:recvcheck

const (
ResourceTypeAny ResourceType = iota
Expand Down
2 changes: 1 addition & 1 deletion pkg/hwinfo/resource_disk_geo.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
)

//go:generate enumer -type=GeoType -json -transform=snake -trimprefix GeoType -output=./resource_enum_geo_type.go
type GeoType uint
type GeoType uint //nolint:recvcheck

const (
GeoTypePhysical GeoType = iota
Expand Down
4 changes: 2 additions & 2 deletions pkg/hwinfo/resource_mem.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
)

//go:generate enumer -type=AccessFlags -json -transform=snake -trimprefix AccessFlags -output=./resource_enum_access_flags.go
type AccessFlags uint
type AccessFlags uint //nolint:recvcheck

const (
AccessFlagsUnknown AccessFlags = iota
Expand All @@ -32,7 +32,7 @@ const (
)

//go:generate enumer -type=YesNoFlags -json -transform=snake -trimprefix YesNoFlags -output=./resource_enum_yes_no_flags.go
type YesNoFlags uint
type YesNoFlags uint //nolint:recvcheck

const (
YesNoFlagsUnknown YesNoFlags = iota
Expand Down
2 changes: 1 addition & 1 deletion pkg/hwinfo/resource_size.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
)

//go:generate enumer -type=SizeUnit -json --transform=snake -trimprefix SizeUnit --output=./resource_enum_size_unit.go
type SizeUnit uint
type SizeUnit uint //nolint:recvcheck

const (
SizeUnitCm SizeUnit = iota
Expand Down
2 changes: 1 addition & 1 deletion pkg/hwinfo/smbios.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import "C"
import "errors"

//go:generate enumer -type=SmbiosType -json -transform=snake -trimprefix SmbiosType -output=./smbios_enum_type.go
type SmbiosType uint
type SmbiosType uint //nolint:recvcheck

// For a full list of types see https://www.dmtf.org/sites/default/files/standards/documents/DSP0134_3.6.0.pdf.
// hwinfo doesn't provide structs for all of these, but we've ensured we at least have their ids so they format
Expand Down
2 changes: 1 addition & 1 deletion pkg/linux/input/input.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
)

//go:generate enumer -type=Bus -json -text -trimprefix Bus -output=./input_bus.go
type Bus uint16
type Bus uint16 //nolint:recvcheck

// Codes taken from
// https://github.com/torvalds/linux/blob/cfaaa7d010d1fc58f9717fcc8591201e741d2d49/include/uapi/linux/input.h#L254
Expand Down
6 changes: 3 additions & 3 deletions pkg/udev/udev.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package udev

/*
#cgo LDFLAGS: -ludev
#cgo pkg-config: libudev
#include <libudev.h>
#include <stdlib.h>
#include <string.h>
Expand Down Expand Up @@ -54,7 +54,7 @@ import (
)

//go:generate enumer -type=Bus -json -text -transform=snake -trimprefix Bus -output=./udev_bus.go
type Bus int
type Bus int //nolint:recvcheck

const (
BusAta Bus = iota // ATA (IDE) devices
Expand All @@ -75,7 +75,7 @@ const (
)

//go:generate enumer -type=Type -json -text -trimprefix Type -output=./udev_type.go
type Type int
type Type int //nolint:recvcheck

const (
TypeDisk Type = iota
Expand Down
2 changes: 1 addition & 1 deletion pkg/virt/virt.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
// Type represents various virtualisation and container types.
//
//go:generate enumer -type=Type -json -text -transform=snake -trimprefix Type -output=./virt_enum_type.go
type Type int
type Type int //nolint:recvcheck

//nolint:revive,stylecheck
const (
Expand Down

0 comments on commit 7d37427

Please sign in to comment.