diff --git a/receiver/hostmetricsreceiver/internal/scraper/pagingscraper/pagefile.go b/receiver/hostmetricsreceiver/internal/scraper/pagingscraper/pagefile.go index 5892bfd1c35c3..385e552df87a9 100644 --- a/receiver/hostmetricsreceiver/internal/scraper/pagingscraper/pagefile.go +++ b/receiver/hostmetricsreceiver/internal/scraper/pagingscraper/pagefile.go @@ -8,5 +8,5 @@ type pageFileStats struct { usedBytes uint64 freeBytes uint64 totalBytes uint64 - cachedBytes *uint64 // Optional + cachedBytes *uint64 //nolint:unused } diff --git a/receiver/hostmetricsreceiver/internal/scraper/pagingscraper/pagefile_windows.go b/receiver/hostmetricsreceiver/internal/scraper/pagingscraper/pagefile_windows.go index f936999896d8b..3f230a255f3a8 100644 --- a/receiver/hostmetricsreceiver/internal/scraper/pagingscraper/pagefile_windows.go +++ b/receiver/hostmetricsreceiver/internal/scraper/pagingscraper/pagefile_windows.go @@ -43,17 +43,17 @@ type systemInfo struct { func getPageSize() uint64 { var sysInfo systemInfo - procGetNativeSystemInfo.Call(uintptr(unsafe.Pointer(&sysInfo))) + procGetNativeSystemInfo.Call(uintptr(unsafe.Pointer(&sysInfo))) //nolint:errcheck return uint64(sysInfo.dwPageSize) } // system type as defined in https://docs.microsoft.com/en-us/windows/win32/api/psapi/ns-psapi-enum_page_file_information type enumPageFileInformation struct { - cb uint32 - reserved uint32 + cb uint32 //nolint:unused + reserved uint32 //nolint:unused totalSize uint64 totalInUse uint64 - peakUsage uint64 + peakUsage uint64 //nolint:unused } func getPageFileStats() ([]*pageFileStats, error) { diff --git a/receiver/hostmetricsreceiver/internal/scraper/processscraper/internal/handlecount/handles_windows.go b/receiver/hostmetricsreceiver/internal/scraper/processscraper/internal/handlecount/handles_windows.go index 876e450301db1..e6d874ff057db 100644 --- a/receiver/hostmetricsreceiver/internal/scraper/processscraper/internal/handlecount/handles_windows.go +++ b/receiver/hostmetricsreceiver/internal/scraper/processscraper/internal/handlecount/handles_windows.go @@ -53,6 +53,7 @@ func (m *handleCountManager) GetProcessHandleCount(pid int64) (uint32, error) { type wmiHandleCountQueryer struct{} +//revive:disable-next-line:var-naming type Win32_Process struct { ProcessID int64 HandleCount uint32