Skip to content

Commit 2feda42

Browse files
bwplotkakakkoyun
andauthored
Fixed README & CHANGELOG; Added fmt makefile command (+bingo) for easier contributions. (#1289)
* Fixed README; Added fmt command for easier contributions. Signed-off-by: bwplotka <[email protected]> * Updated golint. Signed-off-by: bwplotka <[email protected]> * Update Makefile Co-authored-by: Kemal Akkoyun <[email protected]> Signed-off-by: Bartlomiej Plotka <[email protected]> --------- Signed-off-by: bwplotka <[email protected]> Signed-off-by: Bartlomiej Plotka <[email protected]> Co-authored-by: Kemal Akkoyun <[email protected]>
1 parent 5b9cf9c commit 2feda42

File tree

15 files changed

+96
-16
lines changed

15 files changed

+96
-16
lines changed

.bingo/.gitignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
2+
# Ignore everything
3+
*
4+
5+
# But not these files:
6+
!.gitignore
7+
!*.mod
8+
!*.sum
9+
!README.md
10+
!Variables.mk
11+
!variables.env
12+
13+
*tmp.mod

.bingo/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Project Development Dependencies.
2+
3+
This is directory which stores Go modules with pinned buildable package that is used within this repository, managed by https://github.com/bwplotka/bingo.
4+
5+
* Run `bingo get` to install all tools having each own module file in this directory.
6+
* Run `bingo get <tool>` to install <tool> that have own module file in this directory.
7+
* For Makefile: Make sure to put `include .bingo/Variables.mk` in your Makefile, then use $(<upper case tool name>) variable where <tool> is the .bingo/<tool>.mod.
8+
* For shell: Run `source .bingo/variables.env` to source all environment variable for each tool.
9+
* For go: Import `.bingo/variables.go` to for variable names.
10+
* See https://github.com/bwplotka/bingo or -h on how to add, remove or change binaries dependencies.
11+
12+
## Requirements
13+
14+
* Go 1.14+

.bingo/Variables.mk

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Auto generated binary variables helper managed by https://github.com/bwplotka/bingo v0.8. DO NOT EDIT.
2+
# All tools are designed to be build inside $GOBIN.
3+
BINGO_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
4+
GOPATH ?= $(shell go env GOPATH)
5+
GOBIN ?= $(firstword $(subst :, ,${GOPATH}))/bin
6+
GO ?= $(shell which go)
7+
8+
# Below generated variables ensure that every time a tool under each variable is invoked, the correct version
9+
# will be used; reinstalling only if needed.
10+
# For example for goimports variable:
11+
#
12+
# In your main Makefile (for non array binaries):
13+
#
14+
#include .bingo/Variables.mk # Assuming -dir was set to .bingo .
15+
#
16+
#command: $(GOIMPORTS)
17+
# @echo "Running goimports"
18+
# @$(GOIMPORTS) <flags/args..>
19+
#
20+
GOIMPORTS := $(GOBIN)/goimports-v0.9.3
21+
$(GOIMPORTS): $(BINGO_DIR)/goimports.mod
22+
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
23+
@echo "(re)installing $(GOBIN)/goimports-v0.9.3"
24+
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=goimports.mod -o=$(GOBIN)/goimports-v0.9.3 "golang.org/x/tools/cmd/goimports"
25+

.bingo/go.mod

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module _ // Fake go.mod auto-created by 'bingo' for go -moddir compatibility with non-Go projects. Commit this file, together with other .mod files.

.bingo/goimports.mod

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
2+
3+
go 1.20
4+
5+
require golang.org/x/tools v0.9.3 // cmd/goimports

.bingo/goimports.sum

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
golang.org/x/mod v0.10.0 h1:lFO9qtOdlre5W1jxS3r/4szv2/6iXxScdzjoBMXNhYk=
2+
golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
3+
golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU=
4+
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
5+
golang.org/x/tools v0.9.3 h1:Gn1I8+64MsuTb/HpH+LmQtNas23LhUVr3rYZ0eKuaMM=
6+
golang.org/x/tools v0.9.3/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc=

.bingo/variables.env

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Auto generated binary variables helper managed by https://github.com/bwplotka/bingo v0.8. DO NOT EDIT.
2+
# All tools are designed to be build inside $GOBIN.
3+
# Those variables will work only until 'bingo get' was invoked, or if tools were installed via Makefile's Variables.mk.
4+
GOBIN=${GOBIN:=$(go env GOBIN)}
5+
6+
if [ -z "$GOBIN" ]; then
7+
GOBIN="$(go env GOPATH)/bin"
8+
fi
9+
10+
11+
GOIMPORTS="${GOBIN}/goimports-v0.9.3"
12+

.github/workflows/go.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,6 @@ jobs:
3737
env:
3838
CI: true
3939

40-
- name: Run lint
41-
run: make lint
42-
4340
- name: Run style and unused
4441
if: ${{ matrix.go_version == '1.20' }}
4542
run: make style unused

.github/workflows/golangci-lint.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ jobs:
3232
run: sudo apt-get update && sudo apt-get -y install libsnmp-dev
3333
if: github.repository == 'prometheus/snmp_exporter'
3434
- name: Lint
35-
uses: golangci/golangci-lint-action@v3.2.0
35+
uses: golangci/golangci-lint-action@v3.4.0
3636
with:
37-
version: v1.45.2
37+
args: --verbose
38+
version: v1.51.2

CHANGELOG.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
## Unreleased
22

3-
## 1.15.0 / 2023-04-13
4-
5-
## What's Changed
3+
## 1.15.1 / 2023-05-3
64

75
* [BUGFIX] Fixed promhttp.Instrument* handlers wrongly trying to attach exemplar to unsupported metrics (e.g. summary), \
86
causing panics #1253
97

10-
## What's Changed
8+
## 1.15.0 / 2023-04-13
119

1210
* [BUGFIX] Fix issue with atomic variables on ppc64le #1171
1311
* [BUGFIX] Support for multiple samples within same metric #1181

0 commit comments

Comments
 (0)