Skip to content

Commit

Permalink
Update building
Browse files Browse the repository at this point in the history
* Remove unused / non-standard .go-version.
* Cleanup indenting in Makefile.
* Enable dependabot for subdirs.
* Update golanci-lint CI.
* Update go.mod version directives to match supported versions.
* Disable golanci-lint unused-parameter.

Signed-off-by: SuperQ <[email protected]>
  • Loading branch information
SuperQ committed Aug 12, 2023
1 parent 1a88780 commit 1f69324
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 8 deletions.
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,11 @@ updates:
directory: "/"
schedule:
interval: "monthly"
- package-ecosystem: "gomod"
directory: "/examples/middleware"
schedule:
interval: "monthly"
- package-ecosystem: "gomod"
directory: "/tutorial/whatsup"
schedule:
interval: "monthly"
6 changes: 3 additions & 3 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3
- name: install Go
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: 1.18.x
go-version: 1.20.x
- name: Install snmp_exporter/generator dependencies
run: sudo apt-get update && sudo apt-get -y install libsnmp-dev
if: github.repository == 'prometheus/snmp_exporter'
- name: Lint
uses: golangci/[email protected]
with:
args: --verbose
version: v1.51.2
version: v1.53.3
1 change: 0 additions & 1 deletion .go-version

This file was deleted.

6 changes: 6 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,9 @@ linters-settings:
local-prefixes: github.com/prometheus/client_golang
gofumpt:
extra-rules: true
revive:
rules:
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unused-parameter
- name: unused-parameter
severity: warning
disabled: true
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ test-short: deps common-test-short
VERSIONS := 1.19 1.20 1.21
generate-go-collector-test-files:
for GO_VERSION in $(VERSIONS); do \
docker run --rm -v $(PWD):/workspace -w /workspace golang:$$GO_VERSION go run prometheus/gen_go_collector_metrics_set.go; \
docker run --rm -v $(PWD):/workspace -w /workspace golang:$$GO_VERSION go run prometheus/gen_go_collector_metrics_set.go; \
mv -f go_collector_metrics* prometheus; \
done
done

.PHONY: fmt
fmt: common-format
Expand Down
2 changes: 1 addition & 1 deletion examples/middleware/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/jessicalins/instrumentation-practices-examples/middleware

go 1.17
go 1.19

require github.com/prometheus/client_golang v1.13.1

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/prometheus/client_golang

go 1.17
go 1.19

require (
github.com/beorn7/perks v1.0.1
Expand Down

0 comments on commit 1f69324

Please sign in to comment.