Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .github/jsonnetfile.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"subdir": "workflows"
}
},
"version": "1dd22f1dbfa671ac40e4a92f1a56bd9821871d44"
"version": "6c4953b6960ddbed8db8c9b05dd34fc04777615d"
}
],
"legacyImports": true
Expand Down
4 changes: 2 additions & 2 deletions .github/jsonnetfile.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"subdir": "workflows"
}
},
"version": "1dd22f1dbfa671ac40e4a92f1a56bd9821871d44",
"sum": "/Gk8/aqedF23h3wjwG05d8rJJiTMVWHqfceXDOboJBg="
"version": "6c4953b6960ddbed8db8c9b05dd34fc04777615d",
"sum": "cmCJspuBE+wmv0wm94z1sZPTPrs0pdkJ63IDEgTxKUE="
}
],
"legacyImports": false
Expand Down
2 changes: 1 addition & 1 deletion .github/release-workflows.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ local checkTemplate = 'grafana/loki-release/.github/workflows/check.yml@%s' % re
local buildImageVersion = std.extVar('BUILD_IMAGE_VERSION');
local goVersion = std.extVar('GO_VERSION');
local buildImage = 'grafana/loki-build-image:%s' % buildImageVersion;
local golangCiLintVersion = 'v1.64.5';
local golangCiLintVersion = 'v2.3.0';
local imageBuildTimeoutMin = 60;
local imagePrefix = 'grafana';
local dockerPluginDir = 'clients/cmd/docker-driver';
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
"jobs":
"check":
"uses": "grafana/loki-release/.github/workflows/check.yml@1dd22f1dbfa671ac40e4a92f1a56bd9821871d44"
"uses": "grafana/loki-release/.github/workflows/check.yml@6c4953b6960ddbed8db8c9b05dd34fc04777615d"
"with":
"build_image": "grafana/loki-build-image:0.34.6"
"golang_ci_lint_version": "v1.64.5"
"release_lib_ref": "1dd22f1dbfa671ac40e4a92f1a56bd9821871d44"
"golang_ci_lint_version": "v2.3.0"
"release_lib_ref": "6c4953b6960ddbed8db8c9b05dd34fc04777615d"
"skip_validation": false
"use_github_app_token": true
"name": "check"
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/images.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
"jobs":
"check":
"uses": "grafana/loki-release/.github/workflows/check.yml@1dd22f1dbfa671ac40e4a92f1a56bd9821871d44"
"uses": "grafana/loki-release/.github/workflows/check.yml@6c4953b6960ddbed8db8c9b05dd34fc04777615d"
"with":
"build_image": "grafana/loki-build-image:0.34.6"
"golang_ci_lint_version": "v1.64.5"
"release_lib_ref": "1dd22f1dbfa671ac40e4a92f1a56bd9821871d44"
"golang_ci_lint_version": "v2.3.0"
"release_lib_ref": "6c4953b6960ddbed8db8c9b05dd34fc04777615d"
"skip_validation": false
"use_github_app_token": true
"loki-canary-boringcrypto-image":
"env":
"BUILD_TIMEOUT": 60
"GO_VERSION": "1.24.6"
"IMAGE_PREFIX": "grafana"
"RELEASE_LIB_REF": "1dd22f1dbfa671ac40e4a92f1a56bd9821871d44"
"RELEASE_LIB_REF": "6c4953b6960ddbed8db8c9b05dd34fc04777615d"
"RELEASE_REPO": "grafana/loki"
"needs":
- "check"
Expand Down Expand Up @@ -135,7 +135,7 @@
"BUILD_TIMEOUT": 60
"GO_VERSION": "1.24.6"
"IMAGE_PREFIX": "grafana"
"RELEASE_LIB_REF": "1dd22f1dbfa671ac40e4a92f1a56bd9821871d44"
"RELEASE_LIB_REF": "6c4953b6960ddbed8db8c9b05dd34fc04777615d"
"RELEASE_REPO": "grafana/loki"
"needs":
- "check"
Expand Down Expand Up @@ -258,7 +258,7 @@
"BUILD_TIMEOUT": 60
"GO_VERSION": "1.24.6"
"IMAGE_PREFIX": "grafana"
"RELEASE_LIB_REF": "1dd22f1dbfa671ac40e4a92f1a56bd9821871d44"
"RELEASE_LIB_REF": "6c4953b6960ddbed8db8c9b05dd34fc04777615d"
"RELEASE_REPO": "grafana/loki"
"needs":
- "check"
Expand Down Expand Up @@ -381,7 +381,7 @@
"BUILD_TIMEOUT": 60
"GO_VERSION": "1.24.6"
"IMAGE_PREFIX": "grafana"
"RELEASE_LIB_REF": "1dd22f1dbfa671ac40e4a92f1a56bd9821871d44"
"RELEASE_LIB_REF": "6c4953b6960ddbed8db8c9b05dd34fc04777615d"
"RELEASE_REPO": "grafana/loki"
"needs":
- "check"
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/minor-release-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ env:
DRY_RUN: false
GITHUB_APP: "loki-gh-app"
IMAGE_PREFIX: "grafana"
RELEASE_LIB_REF: "1dd22f1dbfa671ac40e4a92f1a56bd9821871d44"
RELEASE_LIB_REF: "6c4953b6960ddbed8db8c9b05dd34fc04777615d"
RELEASE_REPO: "grafana/loki"
SKIP_VALIDATION: false
USE_GITHUB_APP_TOKEN: true
Expand All @@ -19,11 +19,11 @@ jobs:
contents: "write"
id-token: "write"
pull-requests: "write"
uses: "grafana/loki-release/.github/workflows/check.yml@1dd22f1dbfa671ac40e4a92f1a56bd9821871d44"
uses: "grafana/loki-release/.github/workflows/check.yml@6c4953b6960ddbed8db8c9b05dd34fc04777615d"
with:
build_image: "grafana/loki-build-image:0.34.6"
golang_ci_lint_version: "v1.64.5"
release_lib_ref: "1dd22f1dbfa671ac40e4a92f1a56bd9821871d44"
golang_ci_lint_version: "v2.3.0"
release_lib_ref: "6c4953b6960ddbed8db8c9b05dd34fc04777615d"
skip_validation: false
use_github_app_token: true
create-release-pr:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ jobs:
with:
go-version-file: ./operator/go.mod
- name: Lint
uses: golangci/golangci-lint-action@1481404843c368bc19ca9406f87d6e0fc97bdcfd # v7
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8
with:
version: v2.0.2
version: v2.3.0
args: --timeout=5m
working-directory: ./operator
- name: Check prometheus rules
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/patch-release-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ env:
DRY_RUN: false
GITHUB_APP: "loki-gh-app"
IMAGE_PREFIX: "grafana"
RELEASE_LIB_REF: "1dd22f1dbfa671ac40e4a92f1a56bd9821871d44"
RELEASE_LIB_REF: "6c4953b6960ddbed8db8c9b05dd34fc04777615d"
RELEASE_REPO: "grafana/loki"
SKIP_VALIDATION: false
USE_GITHUB_APP_TOKEN: true
Expand All @@ -19,11 +19,11 @@ jobs:
contents: "write"
id-token: "write"
pull-requests: "write"
uses: "grafana/loki-release/.github/workflows/check.yml@1dd22f1dbfa671ac40e4a92f1a56bd9821871d44"
uses: "grafana/loki-release/.github/workflows/check.yml@6c4953b6960ddbed8db8c9b05dd34fc04777615d"
with:
build_image: "grafana/loki-build-image:0.34.6"
golang_ci_lint_version: "v1.64.5"
release_lib_ref: "1dd22f1dbfa671ac40e4a92f1a56bd9821871d44"
golang_ci_lint_version: "v2.3.0"
release_lib_ref: "6c4953b6960ddbed8db8c9b05dd34fc04777615d"
skip_validation: false
use_github_app_token: true
create-release-pr:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ env:
GITHUB_APP: "loki-gh-app"
IMAGE_PREFIX: "grafana"
PUBLISH_TO_GCS: false
RELEASE_LIB_REF: "1dd22f1dbfa671ac40e4a92f1a56bd9821871d44"
RELEASE_LIB_REF: "6c4953b6960ddbed8db8c9b05dd34fc04777615d"
RELEASE_REPO: "grafana/loki"
USE_GITHUB_APP_TOKEN: true
jobs:
Expand Down
154 changes: 75 additions & 79 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,104 +1,100 @@
# This file contains all available configuration options
# with their default values.

version: "2"
# options for analysis running
run:
# define go version
go: "1.24"

# default concurrency is a available CPU number
concurrency: 16

# timeout for analysis, e.g. 30s, 5m, default is 1m
timeout: 10m

# exit code when at least one issue was found, default is 1
issues-exit-code: 1

# include test files or not, default is true
tests: true

# define go version
go: "1.24"
# list of build tags, all linters use it. Default is empty list.
build-tags:
- cgo
- integration
- slicelabels

# exit code when at least one issue was found, default is 1
issues-exit-code: 1
# include test files or not, default is true
tests: true
# output configuration options
output:
formats:
# colored-line-number|line-number|json|tab|checkstyle, default is "colored-line-number"
- format: colored-line-number

# print lines of code with issue, default is true
print-issued-lines: true

# print linter name in the end of issue text, default is true
print-linter-name: true

linters-settings:
goimports:
local-prefixes: github.com/grafana/loki/pkg,github.com/grafana/loki/tools

depguard:
rules:
Main:
deny:
- desc: "Use github.com/go-kit/log instead of github.com/go-kit/kit/log"
pkg: github.com/go-kit/kit/log

misspell:
ignore-words:
- strat

text:
path: stdout
print-linter-name: true
print-issued-lines: true
colors: true
linters:
enable:
- copyloopvar
- depguard
- errcheck
- gochecksumtype
- goconst
- revive
- govet
- ineffassign
- misspell
- unconvert
- govet
- typecheck
- depguard
- copyloopvar
- gofmt
- goimports
- gosimple
- revive
- staticcheck
- gochecksumtype
- unconvert
disable:
- unused
- unparam

- unused
settings:
depguard:
rules:
Main:
deny:
- pkg: github.com/go-kit/kit/log
desc: Use github.com/go-kit/log instead of github.com/go-kit/kit/log
misspell:
ignore-rules:
- strat
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
rules:
- path: pkg/scheduler/scheduler.go
text: 'SA1019: msg.GetHttpRequest is deprecated: Do not use'
- linters:
- goconst
path: (.+)_test\.go
- path: (.+)\.go$
text: Error return value of .*log\.Logger\)\.Log\x60 is not checked
- path: (.+)\.go$
text: Error return value of .*.Log.* is not checked
- path: (.+)\.go$
text: Error return value of `` is not checked
- path: (.+)\.go$
text: Error return value of `.*WriteString` is not checked
paths:
- .*.pb.go
- .*.y.go
- .*.rl.go
- .*.deepcopy.go
- win_eventlog$
- operator
issues:
exclude:
- Error return value of .*log\.Logger\)\.Log\x60 is not checked
- Error return value of .*.Log.* is not checked
- Error return value of `` is not checked
- Error return value of `.*WriteString` is not checked
exclude-rules:
- path: pkg/scheduler/scheduler.go
text: 'SA1019: msg.GetHttpRequest is deprecated: Do not use'
- path: '(.+)_test\.go'
linters:
- goconst
fix: true
# which dirs to skip: they won't be analyzed;
# can use regexp here: generated.*, regexp is applied on full path;
# default value is empty list, but next dirs are always skipped independently
# from this option's value:
# vendor$, third_party$, testdata$, examples$, Godeps$, builtin$
exclude-dirs:
- win_eventlog$
- operator
# which files to skip: they will be analyzed, but issues from them
# won't be reported. Default value is empty list, but there is
# no need to include all autogenerated files, we confidently recognize
# autogenerated files. If it's not please let us know.
exclude-files:
- .*.pb.go
- .*.y.go
- .*.rl.go
- .*.deepcopy.go
formatters:
enable:
- gofmt
- goimports
settings:
goimports:
local-prefixes:
- github.com/grafana/loki/pkg
- github.com/grafana/loki/tools
exclusions:
generated: lax
paths:
- .*.pb.go
- .*.y.go
- .*.rl.go
- .*.deepcopy.go
- win_eventlog$
- operator
Loading
Loading