Skip to content

Commit

Permalink
Refactor collectors
Browse files Browse the repository at this point in the history
Signed-off-by: Jan-Otto Kröpke <[email protected]>
  • Loading branch information
jkroepke committed Nov 5, 2023
1 parent 9c0be5f commit e5ed61a
Show file tree
Hide file tree
Showing 206 changed files with 15,270 additions and 13,700 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.51.2
version: v1.55.2
args: "--timeout=5m"

# golangci-lint action doesn't always provide helpful output, so re-run without the action for
Expand Down
2 changes: 1 addition & 1 deletion .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ linters:
- govet
- gofmt
- ineffassign
- structcheck
- unconvert
- varcheck

issues:
exclude:
- don't use underscores in Go names
- don't use an underscore in package name
- exported type .+ should have comment or be unexported
exclude-rules:
- # Golint has many capitalisation complaints on WMI class names
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ BASE_IMAGE=mcr.microsoft.com/windows/nanoserver

.PHONY: build
build: windows_exporter.exe
windows_exporter.exe: **/*.go
windows_exporter.exe: pkg/**/*.go
promu build -v

test:
go test -v ./...

bench:
go test -v -bench='benchmark(cpu|logicaldisk|physicaldisk|logon|memory|net|process|service|system|tcp|time)collector' ./...
go test -v -bench='benchmarkcollector' ./pkg/collector/{cpu,logical_disk,physical_disk,logon,memory,net,process,service,system,tcp,time}

lint:
golangci-lint -c .golangci.yaml run
Expand Down
9 changes: 0 additions & 9 deletions collector/ad_test.go

This file was deleted.

9 changes: 0 additions & 9 deletions collector/adcs_test.go

This file was deleted.

9 changes: 0 additions & 9 deletions collector/adfs_test.go

This file was deleted.

159 changes: 0 additions & 159 deletions collector/collector.go

This file was deleted.

61 changes: 0 additions & 61 deletions collector/collector_test.go

This file was deleted.

Loading

0 comments on commit e5ed61a

Please sign in to comment.