Skip to content

Synchronize common files from prometheus/prometheus #1815

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 17, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions Makefile.common
Original file line number Diff line number Diff line change
@@ -62,6 +62,7 @@ SKIP_GOLANGCI_LINT :=
GOLANGCI_LINT :=
GOLANGCI_LINT_OPTS ?=
GOLANGCI_LINT_VERSION ?= v2.1.5
GOLANGCI_FMT_OPTS ?=
# golangci-lint only supports linux, darwin and windows platforms on i386/amd64/arm64.
# windows isn't included here because of the path separator being different.
ifeq ($(GOHOSTOS),$(filter $(GOHOSTOS),linux darwin))
@@ -156,9 +157,13 @@ $(GOTEST_DIR):
@mkdir -p $@

.PHONY: common-format
common-format:
common-format: $(GOLANGCI_LINT)
@echo ">> formatting code"
$(GO) fmt $(pkgs)
ifdef GOLANGCI_LINT
@echo ">> formatting code with golangci-lint"
$(GOLANGCI_LINT) fmt $(GOLANGCI_FMT_OPTS)
endif

.PHONY: common-vet
common-vet:
@@ -248,8 +253,8 @@ $(PROMU):
cp $(PROMU_TMP)/promu-$(PROMU_VERSION).$(GO_BUILD_PLATFORM)/promu $(FIRST_GOPATH)/bin/promu
rm -r $(PROMU_TMP)

.PHONY: proto
proto:
.PHONY: common-proto
common-proto:
@echo ">> generating code from proto files"
@./scripts/genproto.sh


Unchanged files with check annotations Beta

version: "2"

Check warning on line 1 in .golangci.yml

GitHub Actions / Analyze (go)

1:1 [document-start] missing document start "---"
issues:
max-same-issues: 0
- usestdlibvars
- wastedassign
exclusions:
generated: lax

Check failure on line 20 in .golangci.yml

GitHub Actions / Analyze (go)

20:7 [indentation] wrong indentation: expected 4 but found 6
presets:
- comments
- common-false-positives
main:
deny:
- pkg: github.com/stretchr/testify/assert
desc: Use github.com/stretchr/testify/require instead of github.com/stretchr/testify/assert

Check failure on line 44 in .golangci.yml

GitHub Actions / Analyze (go)

44:81 [line-length] line too long (105 > 80 characters)
- pkg: github.com/go-kit/kit/log
desc: Use github.com/go-kit/log instead of github.com/go-kit/kit/log

Check failure on line 46 in .golangci.yml

GitHub Actions / Analyze (go)

46:81 [line-length] line too long (82 > 80 characters)
- pkg: io/ioutil
desc: Use corresponding 'os' or 'io' functions instead.
errcheck:
perfsprint:
# Optimizes even if it requires an int or uint type cast.
int-conversion: true
# Optimizes into `err.Error()` even if it is only equivalent for non-nil errors.

Check failure on line 58 in .golangci.yml

GitHub Actions / Analyze (go)

58:81 [line-length] line too long (86 > 80 characters)
err-error: true
# Optimizes `fmt.Errorf`.
errorf: true
# Number of days of inactivity before an Issue or Pull Request becomes stale
# daysUntilStale: 30
# Number of days of inactivity before an Issue or Pull Request with the stale label is closed.

Check failure on line 6 in .github/stale.yml

GitHub Actions / Analyze (go)

6:81 [line-length] line too long (94 > 80 characters)
# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale.

Check failure on line 7 in .github/stale.yml

GitHub Actions / Analyze (go)

7:81 [line-length] line too long (113 > 80 characters)
# daysUntilClose: 7
# NOTICE: Check below for the individual settings for each type of event.
# Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled)

Check failure on line 12 in .github/stale.yml

GitHub Actions / Analyze (go)

12:81 [line-length] line too long (103 > 80 characters)
onlyLabels: []

Check warning on line 13 in .github/stale.yml

GitHub Actions / Analyze (go)

13:1 [document-start] missing document start "---"
# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable

Check failure on line 15 in .github/stale.yml

GitHub Actions / Analyze (go)

15:81 [line-length] line too long (98 > 80 characters)
exemptLabels:
- pinned
- security
- "[Status] Maybe Later"
# Set to true to ignore issues in a project (defaults to false)
exemptProjects: true # default: false

Check warning on line 24 in .github/stale.yml

GitHub Actions / Analyze (go)

24:22 [comments] too few spaces before comment
# Set to true to ignore issues in a milestone (defaults to false)
exemptMilestones: true # default: false

Check warning on line 27 in .github/stale.yml

GitHub Actions / Analyze (go)

27:24 [comments] too few spaces before comment
# Set to true to ignore issues with an assignee (defaults to false)
exemptAssignees: false
# Limit to only `issues` or `pulls`
# only: issues
# Optionally, specify configuration settings that are specific to just 'issues' or 'pulls':

Check failure on line 55 in .github/stale.yml

GitHub Actions / Analyze (go)

55:81 [line-length] line too long (91 > 80 characters)
# pulls:
# daysUntilStale: 30
# markComment: >
# This pull request has been automatically marked as stale because it has not had

Check failure on line 59 in .github/stale.yml

GitHub Actions / Analyze (go)

59:81 [line-length] line too long (85 > 80 characters)
# recent activity. It will be closed if no further activity occurs. Thank you
# for your contributions.
version: 2

Check warning on line 1 in .github/dependabot.yml

GitHub Actions / Analyze (go)

1:1 [document-start] missing document start "---"
updates:
- package-ecosystem: "gomod"
directory: "/"
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

Check warning on line 12 in .github/workflows/codeql-analysis.yml

GitHub Actions / Analyze (go)

12:1 [document-start] missing document start "---"
on:

Check warning on line 14 in .github/workflows/codeql-analysis.yml

GitHub Actions / Analyze (go)

14:1 [truthy] truthy value should be one of [false, true]
push:
branches: [ main ]
pull_request:
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

Check warning on line 49 in .github/workflows/codeql-analysis.yml

GitHub Actions / Analyze (go)

49:71 [comments] too few spaces before comment
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@28deaeda66b76a05916b6923827895f2b14ab387 # v3.28.16

Check warning on line 53 in .github/workflows/codeql-analysis.yml

GitHub Actions / Analyze (go)

53:80 [comments] too few spaces before comment
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@28deaeda66b76a05916b6923827895f2b14ab387 # v3.28.16

Check warning on line 64 in .github/workflows/codeql-analysis.yml

GitHub Actions / Analyze (go)

64:85 [comments] too few spaces before comment
# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl